DefinitelyTyped/types/auth0.widget/index.d.ts
Nathan Shively-Sanders 6f4c34b258
Fix bad types/v* references in tests (#40575)
* Stop relying on old versions of dependencies

gulp-connect *apparently* works with gulp 3 or 4, but the examples on
the homepage are written for gulp 3. I updated them minimally to work
with gulp 4 -- its types at least.

auth0.widget depends on auth0-js which now uses modules. I switched to
import types and updated the type names.

* require 2.9 for auth0.widget
2019-11-21 16:05:37 -08:00

46 lines
1.6 KiB
TypeScript

// Type definitions for Auth0Widget.js
// Project: http://auth0.com
// Definitions by: Robert McLaws <https://github.com/advancedrei>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
/// <reference types="auth0-js" />
interface Auth0WidgetStatic {
new(params: Auth0Constructor): Auth0WidgetStatic;
getClient(): import("auth0-js").Authentication;
getProfile(token: string, callback: Function): import("auth0-js").Auth0UserProfile;
parseHash(hash: string): import("auth0-js").Auth0DecodedHash;
reset(options: Auth0Options, callback?: Function): Auth0WidgetStatic;
signin(options: Auth0Options, widgetLoadedCallback?: Function, popupCallback?: Function): Auth0WidgetStatic;
signup(options: Auth0Options, callback: (error?: import("auth0-js").Auth0Error, profile?: import("auth0-js").Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): Auth0WidgetStatic;
}
type ClientOptions = import("auth0-js").AuthOptions;
interface Auth0Constructor extends ClientOptions {
assetsUrl?: string;
cdn?: string;
dict?: any;
}
interface Auth0Options {
access_token?: string;
connections?: string[];
container?: string;
enableReturnUserExperience?: boolean;
extraParameters?: any;
icon?: string;
protocol?: string;
request_id?: string;
scope?: string;
showIcon?: boolean;
showForgot?: boolean;
showSignup?: boolean;
state?: any;
userPwdConnectionName?: string;
username_style?: string;
}
declare var Auth0Widget: Auth0WidgetStatic;