barteloma
barteloma

Reputation: 6845

IdentityServer3 implicit flow not wokred javascript

I have a client configuration that has implicit flow.

   new Client
   {
       Enabled = true,
       ClientId = "implicit",
       ClientName = "Implicit Grant Flow",
       Flow = Flows.Implicit,
       RedirectUris = new List<string>
       {
              "http://localhost:24678/callback.html",
       },
       AllowedScopes = new List<string>
       {
              Constants.StandardScopes.OpenId
       }
   }

I want to redirect my javascript clints to IdentityServer3 login page.

        var url = "http://localhost:4751/connect/authorize"
            + "?client_id=" + ("implicit")
            + "&redirect_uri=" + encodeURIComponent("http://localhost:24678/callback.html")
            + "&response_type=" + ("token")
            + "&response_mode=" + ("form_post")
            + "&scope=" + ("openid");

But error occured:

HTTP Error 405.0 - Method Not Allowed

Upvotes: 0

Views: 70

Answers (1)

Alain Croiseti&#232;re
Alain Croiseti&#232;re

Reputation: 336

Try with the following settings:

var url = "http://localhost:4751/connect/authorize"
        + "?client_id=" + ("implicit")
        + "&redirect_uri=" + encodeURIComponent("http://localhost:24678/callback.html")
        + "&response_type=" + ("id_token")
        + "&response_mode=" + ("fragment")
        + "&scope=" + ("openid")
        + "&nonce=none";

Upvotes: 1

Related Questions