How to fix Google OAuth authentication flow to redirect users to Stripe subscription page instead of repopulating email field in Webflow? Answered

I've linked Google Auth here: https://virtualstagingart.webflow.io/signup. Unfortunately, after clicking "Sign in with Google", the email is simply returned to the email input. I had expected the user to be authenticated and redirected to a stripe subscription page (works this way with username and password). I followed the Google Auth tutorial: https://docs.memberstack.com/hc/en-us/articles/8327236548379-Google-Authentication and used a preconfigured component: https://www.memberstack.com/webflow/webflow-sign-up-clone. Anyone know how to solve this issue?

Loom showing behavior: https://www.loom.com/share/2ea0f4157c254da6a54bc2ba43fa3bbb

Comments

10 comments

  • Comment author
    Jayess

    Hello Lakshman 👋🏼

    Thanks for messaging in 😀 And all the helpful documentation.

    Try changing the method=“get” to “post”

    0
  • Comment author
    Lakshman Mody

    Jayess thanks! I’ll give it a try!

    I made the change, but I'm still seeing the same behavior. Some additional context: it looks like the user is actually created in memberstack after clicking "Sign in with Google"

    so maybe the issue is with the redirect?

    btw, I deleted your signup so that you can try again

    0
  • Comment author
    Jayess

    Okay, I tried logging in after signing up and it took me to /gated-content/pro and then back to the /signup page which makes me think this is a permission issue.

    Maybe it’s this line of code that has a href=#? Also when I sign up with google I don’t have a plan attached, which is why I don’t have permission and are getting re-directed out and back to /signup page.

    Chukwudi Do you see anything standing out?

    0
  • Comment author
    Lakshman Mody

    Jayess Removing href=# line in inspector didn't work (the page is copied from the Memberstack template, so I can't even find where in the Webflow UI that logo element actually exists). However, I don't think the 2 would be related anyway: https://www.loom.com/share/61984712245f49d88d6e5fdcc451176a

    "Also when I sign up with google I don’t have a plan attached, which is why I don’t have permission and are getting re-directed out and back to /signup page." - is there any other implementation I should be doing here instead?  My goal is to simply gate content with a paid plan and allow Google auth and username/password auth

    0
  • Comment author
    Jayess

    Okay, I’m coming back to this, it’s access denied because the google auth didn’t attach the plan. That’s why it’s access denied. I’m not actually sure why it’s not picking up the plan, I see the price_id in the and your google auth is in it. Chukwudi what am I missing? 👀

    0
  • Comment author
    Josh Lopez

    Hey there 👋🏻

    Try replacing data-ms-price:update with data-ms-price:add. I think this should do it since the member doesnt have a price to update yet. If this doesnt work let me know and I will look further into the problem

    i see you updated and its still not working. I am trying to debug this right now.

    Thank you for your patience 🙏

    ok just pushed out a fix for this! I tested on your site and i was taken to the stripe checkout!
    0
  • Comment author
    Lakshman Mody

    Oh wow, amazing thanks Josh Lopez! 🔥

    I’m so curious - what was the fix!?

    0
  • Comment author
    Josh Lopez

    it was just a typo in the code. 🤣

    0
  • Comment author
    Lakshman Mody

    Josh Lopez crap - was it something I wrote? or was it something on the Memberstack side?

    0
  • Comment author
    Josh Lopez

    Memberstack side. You are all good!

    0

Please sign in to leave a comment.