Skip to content

v1.0.0

Latest
Compare
Choose a tag to compare
@phoenix-ru phoenix-ru released this 27 Jun 15:46
· 2 commits to main since this release

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

New Contributors

Full Changelog: 0.10.1...v1.0.0