setAuthentication()
Sets the authentication state using a JWT token.
Signature
window.FairShareSDK.setAuthentication(jwt);
Parameters
| Parameter | Type | Description |
|---|---|---|
jwt | string | JWT authentication token |
Example
// Set authentication with JWT token window.FairShareSDK.setAuthentication("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...");
Related
- User — User section overview
- getAuthenticatedUser — Get authenticated user