Using Identity Server inside an Xamarin app

前端 未结 1 1154
面向向阳花
面向向阳花 2021-01-25 03:12

I am trying to get an Xamarin app working with Identity server. I have followed these steps:

1) Download this: https://github.com/IdentityModel/IdentityModel.OidcClient

相关标签:
1条回答
  • 2021-01-25 03:30

    If you want to test this with multiple devices then you cannot use localhost. You will have to have both devices in the same network and use your local IP address instead.

    For the IdSrv app, you need to configure the hosting URL properly, e.g. by changing the launchSettings.json if you are developing locally, or by setting the ASPNETCORE_URL environment variable. When you run the server application, it should tell you that it is listening on http://192.168.1.101:5000 or whatever the local IP address and the selected port is.

    You will then need to configure that as the authority URL in your Xamarin application. The app can then reach the identity server and properly communicate with it.

    If the authentication doesn't work then, the server logs from the identity server should give you further details on what is going wrong. That way, you can tweak the client settings in the identity server, and the authentication settings in your Xamarin app, until everything works.

    0 讨论(0)
提交回复
热议问题