#StackBounty: #azure #azure-active-directory #postman #azure-functions #azure-authentication Azure Function v2 google authentication wi…

Bounty: 50

I have an Azure Function app with Log in with google (I only need google right now) and I cant authenticate correctly

gooogle configured and log in with google on

Trial 1 :

  1. I make a get request to my api : https://examplefunctions.azurewebsites.net/
  2. Google authentication pop up
  3. Enter my credentials
  4. then I make a get request to https://examplefunctions.azurewebsites.net/.auth/me
  5. I get an json with access_token and id_token and other properties like user_claims etc
  6. then I go to postman
  7. make an get request to an function that have AuthorizationLevel.Anonymous : https://examplefunctions.azurewebsites.net/api/myfunction
  8. Enter the access_token in the autorization with OAuth 2.0
  9. server return an 401 : You do not have permission to view this directory or page.
  10. then replace the access_token with the id_token information in the autorization tab in post man and the server return the same.

After that do the following:

Trial 2 :

  1. go to https://examplefunctions.azurewebsites.net/.auth/login/google in the browser
  2. Google authentication pop up
  3. Enter my credentials
  4. the server redirect to an url that have this property authenticationToken
  5. I enter this authenticationToken in the OAuth2.0 in postman and return the same 401 : You do not have permission to view this directory or page.

Then I do this and authenticate :

Trial 3 :

  1. go to https://examplefunctions.azurewebsites.net/.auth/login/google in the browser
  2. Google authentication pop up
  3. Enter my credentials
  4. the server redirect to an url that have this property authenticationToken
  5. In the headers of post man I put X-ZUMO-AUTH with the value previusly receive in authenticationToken and voila the server response with an OK status with my expected json.

But here the problem in the trial 3 (the only one that works) I dont receive the claims. –> here I get a null var claims = req.HttpContext.User.Claims;

And I need the user google information. Another thing is That I dont want to login using a header like X-ZUMO-AUTH, I want to use the OAuth 2.0 standard.

I dont know why I cant access using the trial 1 and 2, because the server return me an token after i log in, this token seems useless.

I have been trying to make a good google authentication for a week and I cant, I need your help.

NOTE : I will consume this api with an angular, postman, xamarin or maybe flutter


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.