How to pass Google OAuth 2 token to Azure API Authentication? -


i followed steps here hook google oauth azure authentication. unfortunately, instructions stop short of full solution , don't mention google oauth access_token once have it. tried putting authorization header bearer token (bearer <access_token>), doesn't appear work application sitting behind authorization service sees original authorization header, not expected x-ms-client-principal-name, x-ms-client-principal-id, x-ms-token-google-access-token, etc.

also, when navigate /.auth/me authorization bearer token 401 response.

sadly, of documentation either specific ad (which doesn't seem apply scenario) or specific server-side rendered applications, not spas hosted separate api calling.

an ideal answer tell me need google oauth 2 access_token azure authorization service authenticate token , add expected headers.

edit: access_token not jwt token, may part of problem. if in fact problem , need jwt token how do that? i'm using google client api javascript (beta). attempted jwt token via google oauth 2 dashboard putting bearer token didn't work, despite using application's client secret generate requests.

you can pass access_token in json body '/.auth/login/google' key 'access_token'.

as explained in following link: https://azure.microsoft.com/en-us/blog/announcing-app-service-authentication-authorization/

snippet above link:

"alternatively, client can obtain token using provider sdk , exchange session token. submit http post same endpoint provider token in json body under key “access_token” (or “authenticationtoken” microsoft account). preferred solution mobile applications if provider sdk available on platform, , works many web , api applications."


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo