Overview
Returns a function that calls the Replyke API to sign a JWT using your project’s private key. This is intended exclusively for development and testing of external authentication flows — it lets you generate valid user JWTs from the client without setting up a backend.Usage Example
Parameters
Your Replyke project ID.
Your project’s private key, used to sign the JWT. This key is available in your Replyke dashboard. Never expose this in production code.
The user data to encode in the JWT payload. Must include
id (the external user’s identifier). Additional fields are passed through as custom claims.Returns
ReturnsPromise<string | undefined>. On success, resolves to a signed JWT string that can be passed to the external auth sign-in flow.
Notes
- The function logs a console warning each time it is called as a reminder that it is not for production use.
- Use the returned token with the external authentication flow described in External Authentication.

