hello guys!
Intermediate programmer here! I’m making an app with auth0 login. Unfortunately, after I made the mode of it to production mode, I can’t seem to login, even though I enter the correct details of my Google account. There is no red indicator in the browser in the upper left corner, as I deleted all social connections, except for the Google one. I also tried logging in with my email, and it loads for an infinite amount of time. When I try Google, I click sign in, and it loads forever as well. I have created a Google cloud project, so everything is fine there, so I have no idea what is wrong. What to do? All my callbacks and cross-roigins are correct, as in dev mode, it works.
I’ve checked the tenant associated with your community account, and I couldn’t find any error apart from missing the response_type, which you can find the details to fix here → "Missing required parameter: response_type" Login Error
Sorry, but this doesn’t help me at all. I have no idea how to implement the missing response parameter. I followed every guide that is on this website on how to properly set it up. Everything works perfectly on my localhost, BUT not on my vps. I still get the same error for CORS, and I don’t understand why that is the case.
Thank you for the feedback. Can you share more insight into which SDK you are using and how you are making a call to the /authorize? I’m also sharing a few additional resources that may resolve the issue:
Thank you for sharing your insight. Based on the previous topics and the note in the Nextjs Auth0 SDK the issue may be with the <Link> component. Can you try to change it to the <a> tag?
import Link from "next/link";
import Image from "next/image";
export default function Home() {
return (
<div className="flex justify-center items-center flex-col h-screen w-screen gap-5">
<Image src="./marketShareAppIcon.svg" alt="market share app icon" width={120} height={120}></Image>
<h1>MarketShare</h1>
<h2>By Monopolistic Investor</h2>
<a href="/api/auth/login">Login</a>
<h2>None of the content in this app should be considered financial advice. For informational purposes only!</h2>
</div>
);
}
The layout.tsx (commented UserProvider component - doesn’t make any errors):
import type { Metadata } from "next";
import "./globals.css";
import { UserProvider } from '@auth0/nextjs-auth0/client';
export const metadata: Metadata = {
title: "MarketShare",
description: "A simple app by Monopolistic Investor",
};
export default function RootLayout(props: { children: React.ReactNode }) {
const { children } = props;
return (
<UserProvider>
<html lang="en">
{/* <UserProvider> */}
<body>
{children}
</body>
{/* </UserProvider> */}
</html>
</UserProvider>
);
}
Update regarding the issue, we couldn’t identify the issue that could be causing this issue. If you are using Next.js with Auth0 please make sure to use the latest SDK version, use <a>tag instead of <Link> component and follow our quickstart → Auth0 Next.js SDK Quickstarts: Add Login to your Next.js application