Content-Length: 315883 | pFad | http://github.com/nextauthjs/next-auth/pull/12947/files/84766dc01b363a59776d4f6b3510cd53ff6991d1

F8 Fix undefined providerId by Regloom · Pull Request #12947 · nextauthjs/next-auth · GitHub
Skip to content

Fix undefined providerId #12947

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

Merged
merged 9 commits into from
May 18, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/core/src/lib/utils/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,8 @@ export function parseActionAndProviderId(
)
throw new UnknownAction(`Cannot parse action at ${pathname}`)

return { action, providerId }
return {
action,
providerId: providerId == "undefined" ? undefined : providerId
}
}
6 changes: 6 additions & 0 deletions packages/core/test/url-parsing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ describe("parse the action and provider id", () => {
providerId: "auth0",
basePath: "/auth",
},
{
path: "/auth/signin/undefined",
action: "signin",
providerId: undefined,
basePath: "/auth",
},
])("$path", ({ path, error, basePath, action, providerId }) => {
if (action || providerId) {
const parsed = parseActionAndProviderId(path, basePath)
Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/nextauthjs/next-auth/pull/12947/files/84766dc01b363a59776d4f6b3510cd53ff6991d1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy