brandonk3nt
brandonk3nt
DDeno
Created by brandonk3nt on 4/13/2025 in #help
Google OAuth2 flow with Deno Fresh
Asking for a little assistance with my Google auth flow- specifically for nuances with redirecting and creating/accessing cookies (I use a "token" cookie for auth). Here's my current flow, please advise where something looks "off": 1. User clicks Google OAuth link and does the OAuth "dance" with Google in a popup. 2. Google OAuth redirects to my redirect_url 3. At my redirect URL, I create a token and set it as a cookie, then redirect to my authenticated home route *with a 302 response and a "location" header. (Should I be using Response.redirect("/") here instead of a 302? The problem is that at "/" when I try to read the cookie I set in step #3, server-side logs show that the cookie doesn't exist even though I just set it, but I can see it plain as day in the chrome dev tools. Any suggestions or walkthru's for Google Oauth flow? Thanks!
3 replies