forked from nextauthjs/next-auth
-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] main from nextauthjs:main #264
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGE: We have supported throwing strings for redirections, while we were showing a waring. From now on, it is not possible. The user MUST return a string, rather than throw it.
BREAKING CHANGE: adding `state: true` is already redundant as `protection: "state` is the default value. `state: false` can be substituted with `protection: "state"`
* feat(build): optionally include TypeORM If the user doesn't use databases, it shouldn't be necessary to iclude it in the bundle. This can more than half the package size! * feat(build): clean up in dependencies Remove unused dependencies, move optional ones to be optional * feat(build): add exports field * fix: use peerDependenciesMeta instead of non-standard peerOptionalDependecns field * fix: ts-standard string quotes * fix: ts-standard string quotes * refactor: use asnyc/await for sendVerificationRequest * chore(deps): upgrade mongodb, remove require_optional Co-authored-by: ndom91 <yo@ndo.dev> BREAKING CHANGE: `typeorm`, and `nodemailer` are no longer dependencies added by default. If you need any of them, you will have to install them yourself in your project directory. TypeOrm is the default adapter, so if you only provide an `adapter` configuration or a `database`, you will need `typeorm`. You could also check out `@next-auth/typeorm-adapter`. In case you are using the Email provider, you will have to install `nodemailer` (or you can use the choice of your library in the `sendVerificationRequest` callback to send out the e-mail.)
* chore(deps): add optional-require * refactor: use optional-require
* chore(deps): switch back to (updated) require_optional * fix: use @balazsorban/require-optional
Conflicts: config/babel.config.json package-lock.json package.json src/server/index.js src/server/routes/callback.js src/server/routes/signin.js
* feat(adapter): remove built-in adapters and database BREAKING CHANGE: From now on, you will have to import your own adapter Check out https://github.com/nextauthjs/adapters The migration is super easy and has HUGE advantages for those not using TypeORM. ```diff // [...nextauth].js + import TypeORMAdapter from "@next-auth/typeorm-legacy-adapter" import NextAuth from "next-auth" ... export default NextAuth({ - database: "yourconnectionstring", + adapter: TypeORMAdapter("yourconnectionstring") }) ``` Co-authored-by: Lluis Agusti <hi@llu.lu> Co-authored-by: Giovanni Carnel <479046+g10@users.noreply.github.com>
BREAKING CHANGE: If you currently use `AzureADB2C`, you will need to update it to to `AzureAD` There should be no other changes needed.
**What**: These changes ensure that we work more tightly with React that can also result in unforeseen performance boosts. In case we would decide on expanding to other libraries/frameworks, a new file per framework could be added. **Why**: Some performance issues (#844) could only be fixed by moving more of the client code into the `Provider`. **How**: Refactoring `next-auth/client` Related: #1461, #1084, #1462 BREAKING CHANGE: **1.** `next-auth/client` is renamed to `next-auth/react`. **2.** In the past, we exposed most of the functions with different names for convenience. To simplify our source code, the new React specific client code exports only the following functions, listed with the necessary changes: - `setOptions`: Not exposed anymore, use `SessionProvider` props - `options`: Not exposed anymore, use `SessionProvider` props - `session`: Rename to `getSession` - `providers`: Rename to `getProviders` - `csrfToken`: Rename to `getCsrfToken` - `signin`: Rename to `signIn` - `signout`: Rename to `signOut` - `Provider`: Rename to `SessionProvider` **3.** `Provider` changes. - `Provider` is renamed to `SessionProvider` - The `options` prop is now flattened as the props of `SessionProvider`. - `clientMaxAge` has been renamed to `staleTime`. - `keepAlive` has been renamed to `refetchInterval`. An example of the changes: ```diff - <Provider options={{clientMaxAge: 0, keepAlive: 0}}>{children}</Provider> + <SessionProvider staleTime={0} refetchInterval={0}>{children}</SessionProvider> ``` **4.** It is now **required** to wrap the part of your application that uses `useSession` into a `SessionProvider`. Usually, the best place for this is in your `pages/_app.jsx` file: ```jsx import { SessionProvider } from "next-auth/react" export default function App({ Component, pageProps: { session, ...pageProps } }) { return ( // `session` comes from `getServerSideProps` or `getInitialProps`. // Avoids flickering/session loading on first load. <SessionProvider session={session}> <Component {...pageProps} /> </SessionProvider> ) } ```
* docs: add versioned docs for unreleased canary 4.x * docs(fix): prettier broke custom image component without .mdx extension * docs(feat): automatically fetch latest stable version label * docs: cleanup script * docs: cleanup next version name * docs(chore): cleanup version leftovers * docs: fix .gitignore * docs: v4 default * docs: remove auto version generation * docs: fix missing import * docs: rm node-fetch
* English language sentence fix Co-authored-by: Balázs Orbán <info@balazsorban.com>
* fix(docs): scope expects space separated string Currently the docs list string[] as possible type for scope. However, It only accepts a string (with space as separator). Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
* fix: improve types for encode/decode functions * fix: use Awaitable type for encode/decode functions
* fix: don't default to localhost on `host` * fall back to `host` for `callbackUrl` * use parsed host * remove unnecessary type cast
* feat: updated fusionauth provider * Updated fusionauth profile interface docstring Co-authored-by: Balázs Orbán <info@balazsorban.com> * Refactored openid well know logic Co-authored-by: Balázs Orbán <info@balazsorban.com> * Removed jwks endpoint property Co-authored-by: Balázs Orbán <info@balazsorban.com>
If the `req` sent to `getToken` doesn't have the relevant cookies, use the Bearer token in the Authorization header as a fallback. Fixes #3452
* fix #3449: removed default placeholder for credentials provider * fix: formatting
* Update strava.js Auth with Strava was throwing errors before, this works. * Update strava.js changed according to commenters' suggestions * chore: run linter Co-authored-by: Balázs Orbán <info@balazsorban.com>
* Update client.ts Set custom.setHttpOptionsDefaults before Issuer.discover(.wellKnown). This allow discover the .wellKnown endpoint behind a proxy * chore: address code review Co-authored-by: Balázs Orbán <info@balazsorban.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )