I use the TokenAuthenticationType "Code" and expected a "silent token refresh", but does not worked for me.
The URL is a "ArcGIS Portal" where i already registered my app.
Hier is how I generate the tokens:
public static async Task<Credential> PromptCredentialAsync(CredentialRequestInfo info)
{
var credential = await AuthenticationManager.Current.GenerateCredentialAsync(
info.ServiceUri,
new GenerateTokenOptions()
{
TokenAuthenticationType = TokenAuthenticationType.OAuthAuthorizationCode,
TokenExpirationInterval = TimeSpan.FromMinutes(10) // Just as an example - the default is 30 minutes
});
...
After teh token hast been expired, the user has to authenticate again (user/password), what I want to be avoided. Any one knows abou that?
Thanks a lot.
According to my experience with OAuth2, choosing the OAuthAuthorizationCode should refresh the access token silently/automatically (that is what I need). - Only with OAuthAuthorizationImplicit would mean that the user must authenticate again.