github sidebase/nuxt-auth 0.3.1

latest releases: v1.0.2, 1.0.1, v1.0.0...
2 years ago

To use:

npm i -D @sidebase/nuxt-auth@0.3.1

Main impact of this release is:

  1. Better Session typing: With this release Session typing is now correctly inferred thanks to @JoaoPedroAS51 in #115. This means that custom typing of the session will now work:

    import NextAuth, { DefaultSession } from "next-auth";
    
    declare module "next-auth" {
      interface Session {
        user: {
          /** The user's postal address. */
          address: string
        } & DefaultSession["user"]
      }
    }

    Then in code .address becomes available:
    image

  2. Fix redirect: false being ignored for signIn and signOut: There was a bug that effectively lead to redirect: false being ignored on signIn and signOut. This releases fixes this which in turn allows you to for example perform a custom signIn flow or handle sign in errors yourself. See the new documentation on this:
    image

Commits

  • fix: catch errors and retrieve their data on signIn, signOut by @BracketJohn in #122
  • fix: use type Session from next-auth by @JoaoPedroAS51 in #115
  • feat(playground): add example custom sign in page by @BracketJohn in #96
  • feat(docs): cleanup readme, dont repeat same claim multiple times by @BracketJohn in #98
  • fix(docs): finish intro sentence by @BracketJohn in #101
  • fix(docs): Removed index page of docs from mobile sidebar by @zoey-kaiser in #105
  • feat(docs): improve .default ts ignore by replacing it with ts expect error by @BracketJohn in #114
  • feat(docs): state more clearly that this lib is for non-static libraries, state more clearly that next auth ressources can be used by @BracketJohn in #121

Full Changelog: 0.3.0...0.3.1

Don't miss a new nuxt-auth release

NewReleases is sending notifications on new releases.