Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: oAuth2 #354

Open
GeoITwinkle opened this issue Apr 3, 2021 · 0 comments
Open

Question: oAuth2 #354

GeoITwinkle opened this issue Apr 3, 2021 · 0 comments

Comments

@GeoITwinkle
Copy link

It seems the Challenger and SignInForm in Toolkit support username/password but not oAuth2. However, our clients may access both types of sources, so I need a challenger to handle both situations. Right now, my approach is this:

  1. Follow the example to set up oAuth2 challenger (https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Security/OAuth).
  2. When the function CreateCredentialAsync(CredentialRequestInfo info) is called, try oAuth2 first.
  3. If oAuth2 failed, try username/password with the SignInForm.

This approach is kind of working, but not a good solution. The CredentialRequestInfo parameter does not tell whether it is oAuth2 or username/password, and both of them belong to AuthentiationType.Token enum. So, it seems I can only try both.

Is there a better way to do it? In addition, is the Challenger and SignInForm in Toolkit going to support oAuth2 later?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant