authentication
Properties
Link copied to clipboard
An Event which fires when the authentication sessions of an authentication provider have been added, removed, or changed.
Functions
Link copied to clipboard
fun getAccounts(providerId: String): PromiseLike<ReadonlyArray<AuthenticationSessionAccountInformation>>
Get all accounts that the user is logged in to for the specified provider. Use this paired with getSession in order to get an authentication session for a specific account.
Link copied to clipboard
fun getSession(providerId: String, scopes: ReadonlyArray<JsString>, options: JsAny): PromiseLike<AuthenticationSession>
fun getSession( providerId: String, scopes: ReadonlyArray<JsString>, options: AuthenticationGetSessionOptions = definedExternally): PromiseLike<AuthenticationSession?>
Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not registered, or if the user does not consent to sharing authentication information with the extension. If there are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use.
Link copied to clipboard
fun registerAuthenticationProvider( id: String, label: String, provider: AuthenticationProvider, options: AuthenticationProviderOptions = definedExternally): Disposable
Register an authentication provider.