Skip to content

Upgrade to 1.0.0

This release contains breaking changes for signIn and signUp functions

🎉 We're excited to share that @sidebase/nuxt-auth is moving towards its 1.0 release! Read the full roadmap here.

Installation

bash
npm i -D @sidebase/nuxt-auth@^1.0.0
bash
pnpm i -D @sidebase/nuxt-auth@^1.0.0
bash
yarn add --dev @sidebase/nuxt-auth@^1.0.0

⚠️ 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:

ts
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:

ts
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:

ts
const signInResponse = await signIn(/* ... */)

const isResponseDefined = signInResponse 
const isResponseDefined = signInResponse.error === null

if (isResponseDefined) {
  // ...
}

Changelog

Full Changelog: https://github.com/sidebase/nuxt-auth/compare/0.10.1...v1.0.0

Released under the MIT License.