OAuth Authorization vs Authentication

OAuth is a specification for authorization OAuth 2.0 is a specification for authorization, but NOT for authentication. RFC 6749, 3.1. Authorization Endpoint explicitly says as follows: The authorization endpoint is used to interact with the resource owner and obtain an authorization grant. The authorization server MUST first verify the identity of the resource owner. The … Read more

Access to Google API – GoogleAccountCredential.usingOAuth2 vs GoogleAuthUtil.getToken()

The Google APIs Client Library for Java is as the name suggests a library for accessing Google APIs and it is available for several platforms such as Java (in general) and Android while the Google Play Services and GoogleAuthUtil is only available on Android. By looking at the wiki page of the project it is … Read more

Access to fetch at https://accounts.google.com/o/oauth2/v2/auth has been blocked by CORS

The authentication flow must happen in a visible browsing context, not with a fetch request. In other words: You must navigate the current tab to (or open a new tab at) http://localhost:8000/api/mail/login, the tab will then be redirected to https://accounts.google.com/o/oauth2/v2/auth?… and this page becomes visible. Now the user must interact with that page to choose/confirm … Read more

LinkedIn OAuth2: “Unable to verify access token”

For me the https://api.linkedin.com/v1/people/~?format=json&oauth2_access_token=[accessToken] didn’t work. Adding reguest header Authorization: Bearer [accessToken] didn’t work until I went through linked in sdk and tested and found out that they also require you to add request header x-li-src: msdk With those two headers the call https://api.linkedin.com/v1/people/~?format=json worked. Hopefully Linkedin fixes this undocumented requirement soon…

Multiple IdentityServer Federation : Error Unable to unprotect the message.State

I believe you are getting the Unable to unprotect the message.State error because one of your OIDC providers is trying to decrypt/unprotect the message state of the other one. (The message state is just a random string to help with security.) I suggest that you name the AuthenticationSchemes for each OIDC provider like oidc-demo and … Read more