UNPKG

@hellocoop/helper-browser

Version:

Hellō helper functions for the browser

24 lines (23 loc) 793 B
import { Scope, AuthResponseMode, AuthResponseType, ProviderHint } from '@hellocoop/definitions'; export declare function isValidScope(scope: string): boolean; export declare function areScopesValid(scopes: string[]): boolean; export interface ICreateAuthRequest { client_id: string; redirect_uri: string; scope?: Scope[]; response_type?: AuthResponseType; response_mode?: AuthResponseMode; wallet?: string; nonce?: string; state?: string; login_hint?: string; domain_hint?: string; provider_hint?: ProviderHint[]; prompt?: string; } export interface AuthenticationResponse { url: string; nonce: string; code_verifier: string; } export declare function createAuthRequest(config: ICreateAuthRequest): Promise<AuthenticationResponse>;