diff --git a/types/nuxtjs__auth/index.d.ts b/types/nuxtjs__auth/index.d.ts index bdf88433ad..ade1564e61 100644 --- a/types/nuxtjs__auth/index.d.ts +++ b/types/nuxtjs__auth/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Ruskin Constant // Daniel Leal // Nick Bolles +// Andrii Rodionov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.1 @@ -43,6 +44,13 @@ export interface Auth { setUser(user?: Partial): any; reset(): Promise; redirect(name: string): any; + strategy(): string; + registerStrategy(strategyName: string, strategy: object): void; + setStrategy(strategyName: string): void; + setUserToken(): Promise; + getRefreshToken(strategyName: string): string; + setRefreshToken(strategyName: string, token?: string): string; + syncRefreshToken(strategyName: string): string; } declare module 'vue/types/options' { @@ -56,3 +64,15 @@ declare module 'vue/types/vue' { $auth: Auth; } } + +declare module '@nuxt/vue-app' { + interface Context { + $auth: Auth; + } +} + +declare module '@nuxt/types' { + interface Context { + $auth: Auth; + } +}