xamarin.forms - Severely confused on how to properly use IdentityServer on my App -
i may not understand how implement identityserver4 xamarin.auth.
basically i'm using xamarin.auth multiple cases
- logging in oauth2 vendors (ms/google/fb)
- logging in self implemented oauth2 (not used yet)
speaking of case 1, after committing login mobile app google/ms/fb decide further : go app's main page or register user, register storing email username , userid (the 1 comes vendor) password.
i've implemented identityserver4 aspnetidentity
from i've read need implement hybrid authentication, issue here features need use webview, in case 1 isn't required anymore. think need use authorization flow trying of them failed.
https://localhost:44348/connect/authorize? client_id=xamclient& client_secret=secret&response_type=code+id_token& scope=openid& redirect_uri=https%3a%2f%2flocalhost%3a44348%2fxamarincallback& nonce=7a8ff1c107e345a8b055a8232ec15545& code_challenge=8kk9rq8nx6w3yzl0eu7awqurwnikb9ns9bvwa5lxhhe& code_challenge_method=s256&state=d3a7b6a511da413395b2552fb194af2f
my issue here of examples feature mvc view gets this url redirecturl , after client commits post username , password i'll authorizationcode
, refreshtoken
, identitytoken
.
i uncertain how commit authentication in case, use ?
i can use - implicit - authorization code - reasonable option first scenario ? - hybrid mode - tried day implement realizing it's not possible ..
anyways, after looking @ logs i've seen sudden dubious redirect account controller (asp login controller)
{ "name": "microsoft.applicationinsights.dev.request", "time": "2017-09-12t11:26:56.5388249z", "tags": { "ai.location.ip": "127.0.0.1", "ai.internal.nodename": "edward", "ai.operation.id": "152eb716-4ff8951dec6a1ed1", "ai.internal.sdkversion": "aspnet5c:2.1.1", "ai.application.ver": "1.0.0.0", "ai.operation.name": "get /connect/authorize", "ai.cloud.roleinstance": "edward" }, "data": { "basetype": "requestdata", "basedata": { "ver": 2, "id": "|152eb716-4ff8951dec6a1ed1.", "name": "get /connect/authorize", "duration": "00:00:00.1530713", "success": true, "responsecode": "302", "url": "https://localhost:44348/connect/authorize?client_id=anonymouscheckerclient&client_secret=secret&response_type=code+id_token&scope=openid&redirect_uri=https:%2f%2flocalhost:44348%2fxamarincallback&nonce=af1427d39dc2463697047a834169fdcf&code_challenge=uui0a9cfhrcgvzddv9eh0lc8cdr5we-zwszwby7renq&code_challenge_method=s256&state=aafde38b65044c35b83a1fcb8771de2e", "properties": { "httpmethod": "get", "aspnetcoreenvironment": "development", "developermode": "true" } } } }, { "name": "microsoft.applicationinsights.dev.message", "time": "2017-09-12t11:26:56.6993438z", "tags": { "ai.location.ip": "127.0.0.1", "ai.operation.parentid": "|152eb717-4ff8951dec6a1ed1.", "ai.internal.nodename": "edward", "ai.operation.id": "152eb717-4ff8951dec6a1ed1", "ai.internal.sdkversion": "aspnet5c:2.1.1", "ai.application.ver": "1.0.0.0", "ai.operation.name": "get /account/login", "ai.cloud.roleinstance": "edward" }, "data": { "basetype": "messagedata", "basedata": { "ver": 2, "message": "request starting http/1.1 http://localhost:44348/account/login?returnurl=%2fconnect%2fauthorize%2fcallback%3fclient_id%3danonymouscheckerclient%26client_secret%3dsecret%26response_type%3dcode%2520id_token%26scope%3dopenid%26redirect_uri%3dhttps%253a%252f%252flocalhost%253a44348%252fxamarincallback%26nonce%3daf1427d39dc2463697047a834169fdcf%26code_challenge%3duui0a9cfhrcgvzddv9eh0lc8cdr5we-zwszwby7renq%26code_challenge_method%3ds256%26state%3daafde38b65044c35b83a1fcb8771de2e", "severitylevel": "information", "properties": { "aspnetcoreenvironment": "development", "protocol": "http/1.1", "host": "localhost:44348", "querystring": "?returnurl=%2fconnect%2fauthorize%2fcallback%3fclient_id%3danonymouscheckerclient%26client_secret%3dsecret%26response_type%3dcode%2520id_token%26scope%3dopenid%26redirect_uri%3dhttps%253a%252f%252flocalhost%253a44348%252fxamarincallback%26nonce%3daf1427d39dc2463697047a834169fdcf%26code_challenge%3duui0a9cfhrcgvzddv9eh0lc8cdr5we-zwszwby7renq%26code_challenge_method%3ds256%26state%3daafde38b65044c35b83a1fcb8771de2e", "scheme": "http", "path": "/account/login", "developermode": "true", "categoryname": "microsoft.aspnetcore.hosting.internal.webhost", "method": "get" } } } }
having analyzing identityserver4
git /authorize endpoint accepts get's , no user/pw.
edit 01: i've checked resource , confuses me scenario (1)...
Comments
Post a Comment