Hybrid Authentication with asp.net Identity and Android Authorization -



Hybrid Authentication with asp.net Identity and Android Authorization -

i'm doing website in asp uses identity (v2.0) , android app connected web site through web api.

i've configured identity utilize google oauth signins , works quite well. right i'm trying create web api app , need authenticate mobile users.

i've reached point configure identity manage bearer tokens api. perform signin, way i've found through user , password documentation says:

grant_type=password&username=user&password=pass

or perform oauth challenge web.

as android manages google oauth. there way configure identity perform signins using google oauth?

i have neither found way manage external bearer tokens or utilize google authentication tokens signing web api identity.

maybe i'm misunderstanding something.

thanks in advance.

update

ok, somehow i've found how it.

in android, id token using scope audience:server: ingoogle "accounts authentication , authorization" docs (cant set link).

send web api token endpoin user email , password token.

grant_type=password&username={email}&password={googletoken}

in extendend class oauthauthorizationserverprovider in server, added token verification github repo googleplus/gplus-verifytoken-csharp method grantresourceownercredentials

if token valid, can populate userlogininfo , find user usermanager.

then normal authentication goes on , user authenticated in identity normal.

anyway, think there has more elegant way it.

android asp.net-web-api oauth-2.0 google-oauth asp.net-identity-2

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -