diff --git a/auth0.lock/auth0.lock-tests.ts b/auth0.lock/auth0.lock-tests.ts
index 4ca565f23a..fd646ee1bb 100644
--- a/auth0.lock/auth0.lock-tests.ts
+++ b/auth0.lock/auth0.lock-tests.ts
@@ -1,13 +1,13 @@
///
///
-var lock = new Auth0Lock('dsa7d77dsa7d7', 'mine.auth0.com');
+var lock: Auth0LockStatic = new Auth0Lock("dsa7d77dsa7d7", "mine.auth0.com");
lock.showSignin({
- connections: ['facebook', 'google-oauth2', 'twitter', 'Username-Password-Authentication'],
- icon: 'https://contoso.com/logo-32.png',
- socialBigButtons: true
-},
+ connections: ["facebook", "google-oauth2", "twitter", "Username-Password-Authentication"],
+ icon: "https://contoso.com/logo-32.png",
+ socialBigButtons: true
+ },
() => {
// The Auth0 Widget is now loaded.
- });
+});
diff --git a/auth0.lock/auth0.lock.d.ts b/auth0.lock/auth0.lock.d.ts
index 41882759a3..e8ba3cb996 100644
--- a/auth0.lock/auth0.lock.d.ts
+++ b/auth0.lock/auth0.lock.d.ts
@@ -17,58 +17,64 @@ interface Auth0LockOptions {
callbackURL?: string;
connections?: string[];
container?: string;
- closable: boolean;
- dict: any;
- defaultUserPasswordConnection: string;
+ closable?: boolean;
+ dict?: any;
+ defaultUserPasswordConnection?: string;
defaultADUsernameFromEmailPrefix?: boolean;
- disableResetAction: boolean;
- disableSignupAction: boolean;
- focusInput: boolean;
+ disableResetAction?: boolean;
+ disableSignupAction?: boolean;
+ focusInput?: boolean;
forceJSONP?: boolean;
- gravatar: boolean;
- integratedWindowsLogin: boolean;
- loginAfterSignup: boolean;
- popup: boolean;
- popupOptions: Auth0LockPopupOptions;
- rememberLastLogiun: boolean;
- resetLink: string;
+ gravatar?: boolean;
+ integratedWindowsLogin?: boolean;
+ loginAfterSignup?: boolean;
+ popup?: boolean;
+ popupOptions?: Auth0LockPopupOptions;
+ rememberLastLogin?: boolean;
+ resetLink?: string;
responseType?: string;
- signupLink: string;
- socialBigButtons: boolean;
+ signupLink?: string;
+ socialBigButtons?: boolean;
sso?: boolean;
- theme: string;
- usernameStyle: any;
+ theme?: string;
+ usernameStyle?: any;
+}
+
+interface Auth0LockConstructorOptions {
+ cdn?: string;
+ assetsUrl?: string;
+ useCordovaSocialPlugins?: boolean;
}
interface Auth0LockStatic {
- new(clientId: string, domain: string, options?: Auth0LockOptions): Auth0LockStatic;
+ new (clientId: string, domain: string, options?: Auth0LockConstructorOptions): Auth0LockStatic;
show(): void;
- show(options: Auth0LockOptions) : void;
- show(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void)) : void;
- show(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void)) : void;
+ show(options: Auth0LockOptions): void;
+ show(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+ show(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
showSignin(): void;
- showSignin(options: Auth0LockOptions) : void;
- showSignin(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void)) : void;
- showSignin(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void)) : void;
+ showSignin(options: Auth0LockOptions): void;
+ showSignin(callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
+ showSignin(options: Auth0LockOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, token?: string) => void) : void;
showSignup(): void;
- showSignup(options: Auth0LockOptions) : void;
- showSignup(callback: (error?: Auth0Error) => void)) : void;
- showSignup(options: Auth0LockOptions, callback: (error?: Auth0Error) => void)) : void;
+ showSignup(options: Auth0LockOptions): void;
+ showSignup(callback: (error?: Auth0Error) => void) : void;
+ showSignup(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
showReset(): void;
- showReset(options: Auth0LockOptions) : void;
- showReset(callback: (error?: Auth0Error) => void)) : void;
- showReset(options: Auth0LockOptions, callback: (error?: Auth0Error) => void)) : void;
+ showReset(options: Auth0LockOptions): void;
+ showReset(callback: (error?: Auth0Error) => void) : void;
+ showReset(options: Auth0LockOptions, callback: (error?: Auth0Error) => void) : void;
- hide(callback: () => void) : void;
- logout(callback: () => void) : void;
- }
+ hide(callback: () => void): void;
+ logout(callback: () => void): void;
+}
declare var Auth0Lock: Auth0LockStatic;
declare module "Auth0Lock" {
- export = Auth0Lock
+ export = Auth0Lock;
}