ThirdwebAuthConfig
The configuration to use by the React and React Native SDKs with an auth server.
type ThirdwebAuthConfig = { authUrl: string; domain: string; secureStorage: ISecureStorage;};
The backend URL of the authentication endoints. For example, if your endpoints are
at /api/auth/login
, /api/auth/logout
, etc. then this should be set to /api/auth
.
type authUrl = string;
The frontend domain used to generate the login payload. This domain should match the domain used on your auth backend.
type domain = string;
Secure storage to use for storing the auth token when using JWT tokens.
Do not use a storage option that stores values accessible outside your application (like localStorage on web environments) since you may be exposing your auth token to malicious actors.
** By default auth uses cookies so no need to set this unless you want to specifically use JWT tokens **