Google multiple accounts - In URL selection by email instead of by user number - url

When accessing multiple Google accounts from the browser, with multiple accounts logged in, Google will allow selecting the proper account using a number that identifies the chronologically logged in user, with the syntax:
https://<service-name>/u/<user-number>/
For instance:
https://mail.google.com/mail/u/0/#inbox
https://contacts.google.com/u/2/preview/all
I wonder if is there a way to use an URL where the user-number is replaced with the user email....

This seems to work for Gmail
On Desktop:
https://accounts.google.com/AccountChooser?continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F%3Fauthuser%3DUSERNAME%40DOMAIN&service=mail&Email=USERNAME#DOMAIN
For mobile:
https://accounts.google.com/AccountChooser?continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fmu%2Fmp%2F%3Fauthuser%3DUSERNAME%40DOMAIN&service=mail&Email=USERNAME#DOMAIN

Use this solution https://mail.google.com/mail/u/?authuser=user#gmail.com
Taken from this link https://webapps.stackexchange.com/questions/18959/can-i-form-a-direct-url-to-a-particular-gmail-account/49168#49168

For Google calendar, use:
https://accounts.google.com/AccountChooser?continue=https%3A%2F%2Fcalendar.google.com%2Fcalendar%2Fb%2FUSERNAME%40DOMAIN&Email=USERNAME#DOMAIN
Thats what I got from altering the Riccardo's URL.

Related

How can I change accounts when I am trying to open up a restricted Google Form?

My web browser is logged into multiple Google accounts and I have a restricted Google Form URL like this that I need to open with a specific account.
https://docs.google.com/forms/d/e/XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx/viewform
Google Forms does not have a UI method to switch accounts like many of their other products and it will always try to open the form with the default account (the first one that you authenticated against in your web browser).
Is there a way to make it open in the right account?
As it turns out there is, although this is not apparent anywhere on Google's help site from what I could find.
If you modify the URL and add u/1/ immediately after https://docs.google.com/forms/ then you will be logged into the form using the second Google account that you are authenticated against in your browser.
Note: You will be redirected during this process, so the final URL in your browser will look a little different, but you should be connected to the form with the right account.
https://docs.google.com/forms/u/1/d/e/XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx/viewform
You can change that number to match whichever account that you want to use.
Not sure how to determine the account number?
Look at your Google Mail URL for the account you want. It will look something like this (and has the number you need in it): https://mail.google.com/mail/u/0/#inbox
Also, remember that your Google accounts start counting from 0. So, your first account is 0, your second one is 1, etc.

Google login page - Sign in to continue to companyName

I have modified the user agent to be able to login to Google. When the user tries to login, he sees the following screen:
The company name I hid is clickable. Upon clicking it, there pops a small dialogue box with some Developer Info.
1) Is there any way to disable that link?
2) If not, is it possible to modify the text inside the dialogue box? Because currently, personal email id of a developer is displayed which we don't want.
Any help or relevant link would be appreciated.
EDIT:
Just like YouTube is disabled, I want my company's name to be disabled as well..
It seems that apart from YouTube no other company has this link disabled. I checked on MakeMyTrip, GoIbibo, TripAdvisor, StackOverflow and Quora. As YouTube is such a huge company, they might have got the screen customized from Google, just my hunch.
You have two options:
The best option is to create the project in a different Google account so your personal email won't show.
In the Email field on API console "OAuth Consent screen", you can select the Google group email (so create a group).

How to force login to oauth with specific email address?

Lets say I want a specific user to login with a specific email address.
dave.myservice.com --> dave#example.com
So, if you accessing this page "dave.myservice.com" , I want my application to make him log in with dave#example.com, not with his other personal accounts.
Is this scenario possible?
Thanks in advance!
For Google OAuth, you can use the login_hint parameter to specify an email you would like the user to login with (cf https://developers.google.com/identity/protocols/oauth2/web-server#creatingclient)

iOS Facebook SDK searching for users with Graph search

I am new to Graph Search, and I want to search for a user with an email address. Is that possible? Right now, I only know how to search with their name, like this:
https://graph.facebook.com/search?q=chandler+de+angelis&type=user&access_token={access_token}
I have an email address, and I need to check if there is a Facebook account with the same email address. How can I accomplish this?
The answer to this is from Facebook themselves. In post at https://developers.facebook.com/bugs/335452696581712 a Facebook dev says
The ability to pass in an e-mail address into the "user" search type
was removed on July 10, 2013. This search type only returns results
that match a user's name (including alternate name).
That's Facebook's new rules.

How to uniquely identify someone in oAuth

I'm currently creating a web app using Google's oAuth. I was wondering how I can uniquely identify an authenticated user so I don't accidentally add duplicates.
Doesn't Google give you other unique params like user name or user ID?
For example, Twitter and Facebook, give you user name and a unique url that identifies user's profile picture. If you save that params on server-side you can identify user next time that he comes on your site.
The best way to do this would be to use OpenID with the oAuth extension (aka hybrid).
I am currently using OAuth exclusively and I am requesting the https://www.googleapis.com/auth/userinfo#email scope as described on http://sites.google.com/site/oauthgoog/Home/emaildisplayscope to get the email address of the authenticated user. I am using the email address to uniquely identify the user. This should be good enough for now.
Edited:
According to a recent Google developer comment (https://groups.google.com/group/oauth2-dev/browse_thread/thread/cf5c137f872f9932), they are currently working on this problem, but for anything production ready, you should use OpenID authentication.
You should save somewhere the user_id you have for your users in your site, along with the corresponding access_token and access_token_secret.
Then you can query that table (or wherever you save that information) with the user_id and obtain the proper tokens
Regards

Resources