Can't access login on Thinktecture IdentityServer3 from JavaScript client
I built IdentityServer pretty much following the tutorial with mvc client. http://identityserver.github.io/Documentation/docs/overview/simplestOAuth.html IdentityServer works fine with the mvc client, but I'm using a javascript client, so I downloaded the javascript sample: Javscript Implicit Client: https://github.com /IdentityServer/IdentityServer3.Samples/tree/master/source/Clients/JavaScriptImplicitClient
When I try to login from a client, it always comes back with "Client application unknown or not authorized."
Can anyone point me in the right direction? Is there a way to enable logging to find out why the client is being rejected?
Relevant javascript code:
var config = {
authority: "https://localhost:44302/identity",
client_id: "mws",
redirect_uri: window.location.protocol + "//" + window.location.host + "/index.html",
post_logout_redirect_uri: window.location.protocol + "//" + window.location.host + "/index.html",
// these two will be done dynamically from the buttons clicked
//response_type: "id_token token",
//scope: "openid profile email read write",
// we're not using these in this sample
silent_redirect_uri: window.location.protocol + "//" + window.location.host + "/silent_renew.html",
//silent_renew: true,
// this will allow all the OIDC protocol claims to vbe visible in the window. normally a client app
// wouldn't care about them or want them taking up space
filter_protocol_claims: false
};
Server side client definition:
new Client
{
Enabled = true,
ClientName = "Manager Workstation",
ClientId = "mws",
Flow = Flows.Hybrid,
RequireConsent = true,
RedirectUris = new List<string>
{
"https://localhost:44303/index.html"
},
PostLogoutRedirectUris = new List<string>
{
"https://localhost:44303/index.html"
}
}, ...
source to share
I saw the same error not scoping both client-side and server-side. I added my solution to this SO post: Thinktecture v3 Identity Server Google Provider
source to share