Cannot login with OAuth discord provider from non-host device (Auth.js)
I am trying to simply test my web app from my phone (note: from a dev environment; not production) , but I cannot seem to login with my discord account on it. I have no problems signing in with my discord account when doing so from the same device as the one hosting my app. But as soon as I get to the page from a separate device using the host’s IP address and proper port number, it does not work as expected.
Cannot login with OAuth discord provider from non-host device (Auth.js)
I am trying to simply test my web app from my phone (note: from a dev environment; not production) , but I cannot seem to login with my discord account on it. I have no problems signing in with my discord account when doing so from the same device as the one hosting my app. But as soon as I get to the page from a separate device using the host’s IP address and proper port number, it does not work as expected.
In NextAuth, why is “useSession” lost after the page renders?
‘use client’; import { useSession } from “next-auth/react”; export default function Home() { const { data: session } = useSession(); useEffect(() => { // run getPosts() everytime the user scrolls to the bottom of the page. }, []); async function getPosts() { if (!session) { // I see this text printed out every time this […]