Asp.net JWT Core with Google OAuth

I am new to asp.net core. I am trying to create a simple WEB API with asp.net that uses Jwt Token and Google OAuth.

About JWT, I followed this guide and succeeded: https://stormpath.com/blog/token-authentication-asp-net-core

But I do not know how to perform my authentication using Google OAuth in my WEB API system. What am I thinking about:

  • Since the WEB API has no view, the client application (Desktop App, iOS App) will receive an authentication code and exchange this code for access_token.

  • The web API receives access_token, arrives from the client, sends a request to Google to check the token and perform authentication.

My question is:

  • Is my implementation correct?

  • How to implement it by code?

Thanks,

+5
source share

Source: https://habr.com/ru/post/1257739/


All Articles