Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to create a direct link to a gmail account that will take you to the login screen

$
0
0

This question seems to be asking almost the same thing, but for some reason I can't get any of the answers to fully work in my situation.

I'm looking for a direct link I can put in a web app to navigate to the inbox of a specific gmail account, with the following use cases:

  1. I would like a link to go to admin@domain.com (domain.com is agoogle workspace account).

  2. If a user is logged into user1@gmail.com and NOT intoadmin@domain.com, I'd like to go to the account login page foradmin@domain.com

  3. If the user is not logged in to any gmail services (such as incognito), I'd like the link to go to theaccount login page for admin@domain.com (this is similar to 2, but google treats these differently)

  4. If a user is logged into admin@domain.com, I'd like them to go to the inbox directly.

I tried all the answers on the linked question, but I found they all failed case 2 for me. They would invariably simply go to my first logged in inbox (user1@gmail.com) in my example.

I got further with this answer by setting the passive=false parameter, but while this did show me the login screen for case 2, it autofilled the information with user1@gmail.com.

Is there a way to create a link that would follow these use cases for a gmail inbox? Or at least, is there a link that would simply bring me to the login page for admin@domain.com from all possible starting points?

The webapp will also probably use the gmail api, so if it's possible with that, that would also work as a solution (I haven't had a deep dive into it, but I didn't see anything off the top that would give me a link through the api)


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>