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

404 Error When Sign-Up => Onboarding #84

Open
hmongdev opened this issue Sep 21, 2023 · 2 comments
Open

404 Error When Sign-Up => Onboarding #84

hmongdev opened this issue Sep 21, 2023 · 2 comments

Comments

@hmongdev
Copy link

I'm getting this error whenever I try to sign-up as a new user, with a different gmail:

Screenshot 2023-09-21 at 3 43 46 PM

// middleware debug tells me:
{ "errors": [ { "message": "Unauthorized request", "long_message": "You are not authorized to perform this request", "code": "authorization_invalid" } ], "clerk_trace_id": "0888421536b6a4b48060bc9fc6a06ce4" }

// my authMiddleware.ts
`import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware({
debug: true,

// An array of public routes that don't require authentication.
publicRoutes: ["/", "/api/webhook/clerk"],

// An array of routes to be ignored by the authentication middleware.
ignoredRoutes: ["/api/webhook/clerk"],
});

export const config = {
matcher: ["/((?!.\..|_next).)", "/", "/(api|trpc)(.)"],
};
`
After checking the Clerk documentation, and several posts here with a similar issue, I'm at a loss. Any help would be appreciated.

@hmongdev hmongdev changed the title 404 Error When Sign-Up 404 Error When Sign-Up => Onboarding Sep 21, 2023
@LostAnurag
Copy link

I'm getting this error whenever I try to sign-up as a new user, with a different gmail:

Screenshot 2023-09-21 at 3 43 46 PM

// middleware debug tells me: { "errors": [ { "message": "Unauthorized request", "long_message": "You are not authorized to perform this request", "code": "authorization_invalid" } ], "clerk_trace_id": "0888421536b6a4b48060bc9fc6a06ce4" }

// my authMiddleware.ts `import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware({ debug: true,

// An array of public routes that don't require authentication. publicRoutes: ["/", "/api/webhook/clerk"],

// An array of routes to be ignored by the authentication middleware. ignoredRoutes: ["/api/webhook/clerk"], });

export const config = { matcher: ["/((?!...|next).)", "/", "/(api|trpc)(._)"], }; ` After checking the Clerk documentation, and several posts here with a similar issue, I'm at a loss. Any help would be appreciated.

I am facing same issue, there is any solution to fix this ?

@RANJEETJ06
Copy link

RANJEETJ06 commented Oct 21, 2023

actually the problem is not in the middleware part

check all the html return form wheather you have wrap all of the html return file in or not like in

<ClerkProvider>
<html lang="en">
{your code}
</html>
</ClerkProvider>

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

No branches or pull requests

3 participants