We're excited to share that @sidebase/nuxt-auth has reached its 1.0 release! 🎉
Read more here: #1028
⚠️ Breaking changes
signUp
function in local
provider
There's a breaking change in local
provider signUp
function which now only accepts 2 parameters. This is due to signUp
having an extra parameter from its initial implementation.
If you used signUp
with three parameters, merge the third parameter into the second:
-await signUp(credentials, { external: true }, { preventLoginFlow: true })
+await signUp(credentials, { external: true, preventLoginFlow: true })
-await signUp(credentials, undefined, { preventLoginFlow: true })
+await signUp(credentials, { preventLoginFlow: true })
signIn
function in authjs
provider
This function now always returns an object SignInResult
:
interface SignInResult {
error: string | null
status: number
ok: boolean
url: any
}
This was done to remove the previously missing | void
from the signature, improving type-safety and usability. If you checked for void
being returned, adjust your usage accordingly:
const signInResponse = await signIn(/* ... */)
-if (signInResponse) {
+if (signInResponse.error === null) {
// ...
}
What's Changed
- feat: return signin response if no redirection by @despatates in #977
- Enh(#843): Allow signup flow return data when preventLoginFlow is true by @iamKiNG-Fr in #903
- chore: display register error message by @DevDengChao in #1015
- bump dependencies by @phoenix-ru in #1016
- chore: refactor useAuth composables to encapsulate context by @phoenix-ru in #1024
- fix(#732): disable server side refresh token plugin when disableServerSideAuth by @xavren in #1021
New Contributors
- @iamKiNG-Fr made their first contribution in #903
- @DevDengChao made their first contribution in #1015
- @xavren made their first contribution in #1021
Full Changelog: 0.10.1...v1.0.0