all settings looks good, it runs OK in Preview, can’t figure out why it doesn’t work in production… what else it could be wrong?
What’s the issue that comes up in production? Is it with this API or with the auth?
like the screenshots I provided, no error messages, it just shows nothing on the screen.
Did you authenticate your user in prod? Dev and live doesn’t share the same DB
I understand that Dev and live doesn’t share the same DB.
This API retrieves data from Gmail. The Dev and Live should behave the same, as long as the “App ID” and “Dev. App ID” ,“App Secret” and “Dev. Secret” are the same,
correct?
Yes… but you need to authenticate the user in Both version. However, if you are not using the generic redirect url, you need to have set the url for version-test and live correctly in Google Cloud Console. Are you able to authenticate the user in Live and get the user created?
I add a button to log out, and when I click auth button, it works! but I couldn’t understand why the current user is not the email I auth?
https://…apps.com/gmail-eat888home?authuser=0&prompt=none&scope=email%20profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly%20openid
Did you authenticate with eat888home@gmail.com? From what I understand, no…
I think you are not using the correct auth. Is your goal is to connect only with one account eat888home ( I guess your account) ? If this is the case, authorization code / user-agent oauth is not the auth to use. You should use JWT instead.
no idea about JWT…
here is what I found, hope you can help to solve the issue:
to figure out what’s the different, I compare the URLs of Live and Dev. and found this:
why the gmail.readonly , userinfo.email , userinfo.profile and openid arein different location?
is this the cause of the issue?
appreciate the help!
You didn’t answer the question. Is your goal is to authenticate each user or you only want access to your gmail account?
I have 2 Gmail accounts and I want to be able to read their Gmail messages.
I have 2 APIs for each
I have 2 page for each Gmail accounts
I have issue with the page that auth eat888home@gmail.com
it shows eat888home@gmail.com’s email successfully in both Dev. and Live
, but can’t figure out why it login as wreathster@gmail.com on Live ?
So you are not using the correct auth. The authenticate with user-agent flow will create a user. When you log in with a user, this use the current user logged in credentials. If you want to use two specific gmail account, you need to use JWT auth (service account) instead.
You can continue to use the oauth2 authorization_code flow if you want, but you need to do this manually and not user Bubble auth
i can’t any topic about JWT auth in the forum…
Giving an example here. You will first need to create your service account
Thank you! I follow the instructions and it leads me to workspace.google.com to setup a $21.60 USD/month plan. correct?
I don’t think you need to subscribe to workspace. You should be able to create a service account for your own gmail account
Thank you so much! However, it was a bit too complicated for me. I ended up using a Gmail plugin by Ritz7, and that solved my problem!