OptionaldescriptionOptionalproviderOptionalproviderA promise for an OAuth.AuthorizationRequest that you can use as input for OAuth.PKCEClient.authorize.
Starts the authorization and shows the OAuth overlay in Raycast. As parameter you can either directly use the returned request from OAuth.PKCEClient.authorizationRequest, or customize the URL by extracting parameters from OAuth.AuthorizationRequest and providing your own URL via AuthorizationOptions. Eventually the URL will be used to open the authorization page of the provider in the web browser.
A promise for an OAuth.AuthorizationResponse, which contains the authorization code needed for the token exchange. The promise is resolved when the user was redirected back from the provider's authorization page to the Raycast extension.
Retrieves the stored OAuth.TokenSet for the client. You can use this to initially check whether the authorization flow should be initiated or the user is already logged in and you might have to refresh the access token.
A promise that resolves when the token set has been retrieved.
Removes the stored OAuth.TokenSet for the client.
Securely stores a OAuth.TokenSet for the provider. Use this after fetching the access token from the provider. If the provider returns a a standard OAuth JSON token response, you can directly pass the OAuth.TokenResponse. At a minimum, you need to set the OAuth.TokenSet.accessToken, and typically you also set OAuth.TokenSet.refreshToken and OAuth.TokenSet.isExpired. Raycast automatically shows a logout preference for the extension when a token set was saved.
A promise that resolves when the token set has been stored.
If you want to make use of the convenience OAuth.TokenSet.isExpired method, the property OAuth.TokenSet.expiresIn must be configured.
Creates an authorization request for the provided authorization endpoint, client ID, and scopes. You need to first create the authorization request before calling OAuth.PKCEClient.authorize.