google-authentication

Restrict Google account logins to a specified Apps domain

风流意气都作罢 提交于 2019-12-04 15:36:02
How can I let users log in to my web app with their Google account, and verify that they logged in from a certain Google Apps domain? Does the hd parameter to the Google Authorization service ensure that only the selected domain can be used to login? Or can I get the logged in user's email and verify that it ends with "@domain.com"? This doesn't seem like such a good idea. After login I also need to access the users' Google Contacts, which according to the documentation requires AuthSub proxy authentication . Have a look at the OpenID docs others suggested. In brief, you need to redirect the

How to force an HTTPS callback using Microsoft.AspNetCore.Authentication.Google?

我怕爱的太早我们不能终老 提交于 2019-12-04 15:03:01
I am creating an AspNetCore application with Google authentication. I am deploying this app behind an nginx reverse proxy on an Ubuntu server. Almost everything is working, but I am having trouble with the callback url. In the Google developer console, I have http://localhost:5000/signin-google set as an authorized redirect URI. This works as expected and allows me to use Google authentication when running from my workstation. For production, I have https://myserver/signin-google set as an authorized redirect URI. However, when I try to use it, I get an error from accounts.google.com that http

Trouble Logging In To Google with Headless Chrome / Puppeteer

别等时光非礼了梦想. 提交于 2019-12-04 14:06:57
I'm trying to automate certain tasks for work. We have a portal that requires you to sign in through Google. I've created a Puppeteer instance that navigates to the Google auth page, types in my email and password, then stores the cookies so I can navigate through and manipulate the portal. This works perfectly on my local environment, but I've deployed it to Heroku and Google adds a sign in challenge. After entering the password, I'm given the 'Verify it's you' page that says 'This device isn't recognized' and asks me to complete 2-FA auth. I know I can't turn off 2-FA, so what would be the

Implementing Account Linking - queries

纵饮孤独 提交于 2019-12-04 12:01:40
问题 I've asked a Google Dev Advocate for help as I'm struggling to implement Account Linking on my Google Actions app, he sent me a link to a documentation article I already had read and suggested I also consult Stackoverflow. Having already done the second suggestion too and having struggled to find the exact answers to my questions, I've deiced to link to the doc article here, add all my queries and send this back to the Dev Advocate in the hope to get more clarification, especially as a

using GoogleOAuth2AuthenticationOptions got a redirect_uri_mismatch error

随声附和 提交于 2019-12-04 08:26:16
I'm trying to implement a Google authentication in a MVC 5 web app. Authentication is working fine, but I would retrieve profile and picture informations. To do this, I added a GoogleOAuth2AuthenticationOptions object to specify additional claims : var googleOAuth2AuthenticationOptions = new GoogleOAuth2AuthenticationOptions { ClientId = "xxxxxxxxxxxxxxxx", ClientSecret = "xxxxxxxxxxxxxxxxx", CallbackPath = new PathString("/Account/LoginCallback"), Provider = new GoogleOAuth2AuthenticationProvider() { OnAuthenticated = async context => { context.Identity.AddClaim(new Claim("picture", context

Use Application Default Credentials on Google Compute Engine to access Sheets API

ε祈祈猫儿з 提交于 2019-12-04 04:58:12
问题 Does the ADC (Application Default Credentials) workflow only support Google Cloud APIs (for example, supports for Google Cloud Storage API, but not the Google Sheet API)? I'm referring to google.auth's default method - not having to store any private keys with the code is a great win and the main benefit of making effective use of the ADC (Application Default Credentials) setup. The following code works if I set the GOOGLE_APPLICATION_CREDENTIALS environmental variable to the private key file

Google c# Api, changing from v2.3 to v3

陌路散爱 提交于 2019-12-04 04:46:24
问题 I have the following code to query google analytics using the C# v2.3 api: string username = "SAMPLE@SAMPLE.COM"; string pass = "PASS"; string gkey = "?key=XXXXXXXXXXXXXXXXXXXXXXXXXXX"; string dataFeedUrl = "https://www.google.com/analytics/feeds/data" + gkey; AnalyticsService service = new AnalyticsService("API Sample"); service.setUserCredentials(username, pass); DataQuery query1 = new DataQuery(dataFeedUrl); query1.Ids = "ga:34197921"; query1.Dimensions = "ga:medium,ga:campaign,ga:date,ga

Redirect URI with Google using asp.net MVC

☆樱花仙子☆ 提交于 2019-12-03 21:35:39
I'm trying to use oauth with Google in ASP.NET MVC 5. In Google's developer console I put for the redirect uri: www.mydomain.com/account/externallogincallback and thought that this will do. But it didn't. I put: www.mydomain.com/signin-google and it worked! I tried to search the string "signin-google" in my project but couldn't find it anywhere. Can someone tell me what is going on? why is that so? thanks. I am too lazy to write a properly formatted answer, I placed these comments in code for myself to remember how to resolve this issue. It is not really an issue, just something I never

Error: Google id_token is not allowed to be used with this application. Firebase access fails after it was working

爷,独闯天下 提交于 2019-12-03 16:06:11
I'm using Google SignIn and then authenticate on Firebase using signInWithCredential , passing the Google credentials. I followed all the procedures, and everything was working! And suddenly it stops working. I went to a previous working code and it still fails. So it seems something happened with the database configuration. In Firebase DB I already checked: DB is up and running. As a fact I can read when not logged (as I have defined by rules) Sign-in method for Google is still ENABLED My App is still registered the project configuration, including their SHA1 signature (for debug and release

Use external google-services.json file in library

偶尔善良 提交于 2019-12-03 15:26:18
I'm sharing a single login module across my apps, with a LoginActivity that handles both Facebook and Google auth (logic + UI). Now, with Facebook it's easy to specify a different ID for each app, overriding the library's facebook_app_id string in the app module. I didn't find a way to do the same with Google Sign-In because it requires a google-services.json file. In fact, the build fails if I include the file in the app modules and not in the login library. Error:Execution failed for task ':core:processReleaseGoogleServices'. File google-services.json is missing. The Google Services Plugin