Skip to content

Commit 5e6182f

Browse files
authored
feat: return signin response if no redirection (#977)
1 parent 506f9b1 commit 5e6182f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/guide/application-side/session-access.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ await signIn(credentials, { callbackUrl: 'https://nuxt.org', external: true })
213213

214214
// Trigger a signIn without calling getSession directly. You have to manually call it to get session data.
215215
await signIn(credentials, { callGetSession: false })
216+
217+
// Trigger a signIn and use the data sent by the provider
218+
const res = await signIn(credentials)
216219
```
217220

218221
:::

src/runtime/composables/local/useAuth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ const signIn: SignInFunc<Credentials, any> = async (credentials, signInOptions,
7171

7272
return navigateTo(callbackUrl, { external })
7373
}
74+
75+
return response
7476
}
7577

7678
const signOut: SignOutFunc = async (signOutOptions) => {

0 commit comments

Comments
 (0)