@sidebase/nuxt-auth
Advanced tools
Comparing version
{ | ||
"name": "nuxt-auth", | ||
"configKey": "auth", | ||
"version": "0.0.1-alpha.3" | ||
"version": "0.0.1-beta.1" | ||
} |
@@ -0,1 +1,4 @@ | ||
import type { Session } from 'next-auth'; | ||
import { Ref } from 'vue'; | ||
import type { AppProvider } from 'next-auth/providers'; | ||
interface UseSessionOptions { | ||
@@ -6,3 +9,13 @@ required?: boolean; | ||
} | ||
declare type SignInOptions = Partial<UseSessionOptions>; | ||
declare type GetSessionOptions = Partial<UseSessionOptions>; | ||
interface SignInOptions { | ||
/** | ||
* Specify to which URL the user will be redirected after signing in. Defaults to the page URL the sign-in is initiated from. | ||
* | ||
* [Documentation](https://next-auth.js.org/getting-started/client#specifying-a-callbackurl) | ||
*/ | ||
callbackUrl?: string; | ||
/** [Documentation](https://next-auth.js.org/getting-started/client#using-the-redirect-false-option) */ | ||
redirect?: boolean; | ||
} | ||
interface SignOutOptions { | ||
@@ -14,8 +27,12 @@ callbackUrl?: string; | ||
data: any; | ||
getSession: (getSessionOptions: SignInOptions) => Promise<any>; | ||
getCsrfToken: () => Promise<any>; | ||
getProviders: () => Promise<any>; | ||
signIn: () => void; | ||
signOut: ({ callbackUrl }: SignOutOptions) => Promise<any>; | ||
getSession: (getSessionOptions?: GetSessionOptions) => Promise<Ref<Session>>; | ||
getCsrfToken: () => Promise<Ref<{ | ||
csrfToken: string; | ||
}>>; | ||
getProviders: () => Promise<Ref<AppProvider[]>>; | ||
signIn: (options?: Pick<SignInOptions, 'callbackUrl'>) => Promise<void>; | ||
signOut: ({ callbackUrl }: SignOutOptions) => Promise<Ref<{ | ||
url: string; | ||
}>>; | ||
}>; | ||
export default _default; |
{ | ||
"name": "@sidebase/nuxt-auth", | ||
"version": "0.0.1-alpha.3", | ||
"version": "0.0.1-beta.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -416,3 +416,3 @@ # 🔐 nuxt-auth | ||
Roughly, the roadmap of `nuxt-auth` is: | ||
1. Reach client-side feature parity: There's still a lot of options, configuration and behvaior from the client-side NextAuth.js module that we do not support yet. We first want to reach feature parity on this front, | ||
1. Reach client-side feature parity: There's still a lot of options, configuration and behavior from the client-side NextAuth.js module that we do not support yet. We first want to reach feature parity on this front + support the credential and email flow, | ||
2. Reach configuration & server-side parity: Extending the user data model, ensuring full typescript support in doing that, allowing correct configuration of all supported backends and session storage mediums | ||
@@ -419,0 +419,0 @@ 3. Fill in missing gaps, add some of our own: There's many ideas we have to support extended user management, maybe discuss whether we want to better support the `local` / `credentials` flow than NextAuth.js does out of the box (they don't do it for good reasons, so, there really is an honest discussion to be had), adding more UI focused components that automatically and easily wrap your app in a nice auth page, ... |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
35444
4.2%416
8.05%