User Authentication
Activepieces offers a frontend SDK that allows you to gather credentials from your users and establish connections
within your Activepieces project, which can be named according to your preference. Additionally, Activepieces manages OAuth2 authentication by keeping tokens refreshed.
Identify User
Before using Activepieces SDK, you will need to setup your application so that you can identify your users to Activepieces.
Obtain Signing Key:
Signing keys are currently obtained by manually contacting the Activepieces team.
For security reasons, Activepieces does not store these keys. If a key is lost, a new one will need to be generated by contacting Activepieces again.
Generate User Token:
The signing key will be used to generate JWT tokens for the currently logged-in user on your website, which will then be sent to Activepieces to create a connection with the collected credentials.
To generate these tokens, you will need to add code in your backend and ensure the tokens are signed using the RS256 algorithm.
The signed tokens must include the “sub” and “exp” claims at a minimum:
The following are snapshot code examples from different JWT libraries for creating the user token. You can also use this tool to generate a quick example: https://dinochiesa.github.io/jwt/.