Get Authorization Code
GET/auth/brands/:brandIdentity/authorize
Overview
This is the Authorization Endpoint, used as part of the Authorization Code Grant, with the PKCE extension. This endpoint allows clients to securely authenticate into the Paysafe infrastructure by generating an authorization code
, which can then be exchanged for an access token
. For an enhanced security all clients must use the PKCE
extension with the SHA-256
code challenge method.
How Authorization Code Flow works
-
User initiates a Login process through the Paysafe Embedded Wallet SDK.
-
Paysafe Embedded Wallet SDK redirects user to login page (
/authorize
endpoint). -
User authenticates using one of the configured login options.
-
Upon successful authentication, the authorization endpoint redirects the user back to the application with a single-use
authorization code
. -
The application exchanges the
authorization code
with the Paysafe Embedded Wallet’s Token endpoint, sending along theclient credentials
andPKCE verifier
. -
The token endpoint verifies the
authorization code
,client credentials
, andPKCE verifier
. -
The token endpoint responds with an
access token
(optionallyrefresh token
andID token
). -
The application uses the
access token
to call the wallet’s APIs to access user information or perform actions. -
The wallet API responds with the requested data or performs the requested operation.
Security Considerations
- Strict Redirect URI Validation: Only valid
redirect_uri
values are used for redirections to prevent open redirect vulnerabilities. - OAuth 2.0 Compliance: The Login API strictly adheres to the OAuth 2.0 specification for error reporting and redirection behavior.
Intended Audience
This endpoint is designed for partner applications to facilitate secure authentication for their end-users and to enable access to protected resources.
Request
Responses
- 302