September 20, 2021

Auth0: Invalid RSAES-OAEP padding

Problem

After configuring Auth0 with custom certificates via API, you get Access Denied error when attempting to login.

{ "error": "access_denied", "error_description": "Invalid RSAES-OAEP padding." }


Solution

Add an additional  decryptionKey to the connection's options with the following format.

options: {
  //... other options
  "decryptionKey" : {
        "key": "-----BEGIN PRIVATE KEY-----\n...",
        "cert": "-----BEGIN CERTIFICATE-----\n..."
    }
}

Keep in mind that options are replaced, not merged - so you'll need to send the whole options object to the PATCH call.

No comments:

Post a Comment