Skip to content
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

feat(web): expose Web API compatible version of next-auth #5536

Merged
merged 113 commits into from
Dec 13, 2022

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Oct 10, 2022

Introducing next-auth/web, a fully Web API compatible version of NextAuth.js.

Supersedes #4299

This PR is based on #4769, which has to be merged first. (Diff is therefore currently bigger than it is supposed to be.)

  • crypto interop
  • authorization endpoint
  • callback (token & userinfo endpoints)
  • Node.js/Web interop in core (this should probably not be needed. 🤔)

{theme.brandColor && (
<style
dangerouslySetInnerHTML={{
__html: `:root {--brand-color: ${theme.brandColor}}`,

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
}}
/>
)}
{theme.logo && <img src={theme.logo} alt="Logo" className="logo" />}

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
{providers.map((provider, i) => (
<div key={provider.id} className="provider">
{provider.type === "oauth" || provider.type === "oidc" ? (
<form action={provider.signinUrl} method="POST">

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
Comment on lines +108 to +110
src={`${
provider.style.logo.startsWith("/") ? logos : ""
}${provider.style.logo}`}

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
Comment on lines +116 to +118
src={`${
provider.style.logo.startsWith("/") ? logos : ""
}${provider.style.logoDark}`}

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
providers[i - 1].type !== "email" &&
providers[i - 1].type !== "credentials" && <hr />}
{provider.type === "email" && (
<form action={provider.signinUrl} method="POST">

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
</form>
)}
{provider.type === "credentials" && (
<form action={provider.callbackUrl} method="POST">

Check warning

Code scanning / CodeQL

Exception text reinterpreted as HTML

[Exception text](1) is reinterpreted as HTML without escaping meta-characters.
@github-actions github-actions bot removed providers core Refers to `@auth/core` client Client related code style TypeScript Issues relating to TypeScript labels Dec 13, 2022
@balazsorban44 balazsorban44 marked this pull request as ready for review December 13, 2022 18:17
Copy link
Member

@ThangHuuVu ThangHuuVu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFG 🚢

@balazsorban44 balazsorban44 merged commit a7b6a29 into main Dec 13, 2022
@balazsorban44 balazsorban44 deleted the feat/oauth4webapi-balazs branch December 13, 2022 18:24
@cryptiklemur
Copy link

Any docs on using this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants