Reputation: 109
I'm developing an app which requires oAuth2.0 code authorization. So, I want to open a browser and get the Access Token by logging into their website. But I want to do that within my app, without opening any external browser. Can Anyone Help me ??
The Documentation for the oAuth is Found Here.
Upvotes: 2
Views: 708
Reputation: 32775
I Want to open a browser within an UWP app (for oAuth2 grant)
UWP platform provide WebAuthenticationBroker class to get the Access Token by logging into their website within internal webview. And here is the detail steps how to use WebAuthenticationBroker
. For more info please refer to official WebAuthenticationBroker
code sample.
Upvotes: 2
Reputation: 117086
I understand what it is that you want to do. However what you are requesting would be a security risk for the user.
There is a reason why you cant / shouldnt do this.
Oauth window opening for Google oauth you can see that the server it is going to is in fact googles authorization server.
If it was possible to request authorization from with in your app and you It would be very easy for you to set up a login screen to look exactly like the login for this authorization server. The user would then have no way of knowing that this was a fake login screen they were typing their credentials into.
All that being said I am not familiar with AniList API but I would hope that they do not allow you to do this. Open consent screen in the users browser and let them know that you are concerned with their security.
Upvotes: 1