I'm using AppAuth
framework for authentication in my Swift
app, I can login but after login and coming back to my app, I can't exchange the code and get error invalid client.
My client configuration is:
var client = new Client
{
ClientId = "IOS.Client",
ClientName = "IOS Client",
RedirectUris = { "com.mysite.accounts:/oauthredirect" },
AllowedGrantTypes = GrantTypes.Code, //AuthorizationCode
AllowedScopes = { "openid", "profile", "offline_access" },
};
I set ClientSecret (SHA-256)
and my ClientId
is ok but I get error invalid client.
I checked my logs and there is an error: secret validators could not validate secret
what's wrong?
When using IdentityServer3 and AppAuth you should not use special characters in ClientSecret
and set your grant AuthorizationCodeWithProofKey
.
this link is useful