feat(web): expose Web API compatible version of `next-auth` (#5536)
* WIP use `Request` and `Response` for core
* bump Next.js
* rename ts types
* refactor
* simplify
* upgrade Next.js
* implement body reader
* use `Request`/`Response` in `next-auth/next`
* make linter happy
* revert
* fix tests
* remove workaround for middleware return type
* return session in protected api route example
* don't export internal handler
* fall back host to localhost
* refactor `getBody`
* refactor `next-auth/next`
* chore: add `@edge-runtime/jest-environment`
* fix tests, using Node 18 as runtime
* fix test
* remove patch
* upgrade/add dependencies
* type and default import on one line
* don't import all adapters by default in dev
* simplify internal endpoint config
Instead of passing url and params around as a string and an object,
we parse them into a `URL` instance.
* assert if both endpoint and issuer config is missing
* allow internal redirect to be `URL`
* mark clientId as always internally, fix comments
* add web-compatible authorization URL handling
* fix type
* fix neo4j build
* remove new-line
* reduce file changes in the PR
* simplify types
* refactor `crypto` usage
In Node.js, inject `globalThis.crypto` instead of import
* add `next-auth/web`
* refactor
* send header instead of body to indicate redirect response
* fix eslint
* fix tests
* chore: upgrade dep
* fix import
* refactor: more renames
* wip core
* support OIDC
* remove `openid-client`
* temprarily remove duplicate logos
* revert
* move redirect logic to core
* wip fix css
* revert Logo component
* output ESM
* fix logout
* deprecate OAuth 1, simplify internals, improve defaults
* refactor providers, test facebook
* fix providers
* target es2020
* fix CSS
* update lock file
* make logos optional
* sync with `next-auth`
* clean up `next-auth/edge`
* sync
* remove uuid
* make secret required in dev
* remove todo comments
* pass through OAuth client options
* generate declaration map
* default env secret to AUTH_SECRET
* temporary Headers fix
* move pages to lib
* move errors to lib
* move pages/index to lib
* move routes to lib
* move init to lib
* move styles to lib
* move types to lib
* move utils to lib
* fix imports
* update ignore/clean patterns
* fix imports
* update styles ts
* update gitignore
* update exports field
* revert `next-auth`
* remove extra tsconfig files
* remove `private` from package.json
* remove unused file, expose type
* move gitignore, reduce exposed types
* add back tsconfig files
* remove leftover
* revert gitignore
* remove test script