Verify a signature from client

#1

Hi, I want to verify the signature through Parse Server, send an encrypted signature from the client, verify it on the server, and return error to all requests if the signature is invalid. Is there a more efficient way to do this than using Triggers?

thank you!

#2

IMHO, if you are using parse-server as a middleware in express(or other web application framework), it is obviously possible to add(or ‘use’ in express term) another middleware that handle the signature validation before parse-server kicks in.

#3

something like this:

....
const app = express();

app.use(parseMountPath, (req, res, next) => {
    if (no_need_to_validate || req_is_well_signed)
        return next();

  //give your validation error.
});

app.use(parseMountPath, new ParseServer(options));
1 Like
#4

Thank you very much for your suggestion, I have implemented the signature verification using middleware.