ElectronMainAuthorization Class @beta
Utility to generate OIDC/OAuth tokens for Desktop Applications
Implements
Methods
| Name | Description | |
|---|---|---|
| constructor(config: ElectronMainAuthorizationConfiguration): ElectronMainAuthorization | ||
| clearTokenCache(): Promise<void> Protected | ||
| getAccessToken(): Promise<string> | Obtain an AccessToken for the currently authorized user, or blank string if no token is available. | |
| loadAccessToken(): Promise<string> Protected | Loads the access token from the store, and refreshes it if necessary and possible | |
| processTokenResponse(tokenResponse: TokenResponse): Promise<string> Protected | ||
| refreshToken(): Promise<string> | Forces a refresh of the user's access token regardless if the current token has expired. | |
| setAccessToken(token: string): void Protected | ||
| signIn(): Promise<void> | Initializes and completes the sign-in process for the user. | |
| signInSilent(): Promise<void> | Attempts a silent sign in with the authorization provider | |
| signOut(): Promise<void> | Signs out the current user. | 
Properties
| Name | Type | Description | |
|---|---|---|---|
| _accessToken Protected | string | ||
| issuerUrl Accessor ReadOnly | string | ||
| onUserStateChanged Static Readonly | BeEvent<(token: string) => void> | ||
| redirectUris Accessor ReadOnly | string[] | ||
| scopes Accessor ReadOnly | string | 
Defined in
- main/Client.ts Line 136
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.