3

I built an IdentityServer pretty much following the tutorial with the mvc client. http://identityserver.github.io/Documentation/docs/overview/simplestOAuth.html The IdentityServer works fine with the mvc client, but I am 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 the client, it always comes back with “ The client application is not known or is not authorized."

Can someone point me in the right direction? Is there a way to turn on logging to see 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"
                }
            }, ...
Terry
  • 989
  • 8
  • 29
pinnprophead
  • 215
  • 3
  • 14

2 Answers2

2

I got it to work. The problem was on the service side having the "Flow = Flows.Hybrid" it should have been "Flow = Flows.Implicit"

pinnprophead
  • 215
  • 3
  • 14
0

I saw the same error by not defining the scopes on both the client and server side. I've added my resolution to this SO post: Thinktecture Identity server v3 Google provider

Community
  • 1
  • 1
Matt Woodward
  • 1,941
  • 20
  • 24