Search code examples
oauthionic3identityserver4openid-connect

what is return uri ionic3 for identity server 4?


this is redirect uri for xamarin in identityserver4,

RedirectUri = "xamarinformsclients://callback",

source:

https://github.com/cloudscribe/sample-idserver/blob/master/xclient/XamarinFormsClient/XamarinFormsClient.Core/MainPage.xaml.cs

what is redirect uri for ionic in identityserver4 when usin in app browser.

const ClientId = "IonicClient";
const ClientSecret = "<SECRET>";
const RedirectUri = "http://localhost:8100/";

here is my uri now. but it return to this url not my apps ionic cordova build android


Solution

  • The redirect uri you set up in your client on the identity server must exactly match the one you are using in the client application. You can just guess or make up a redirect uri you need to know where you want the return to go to. Check the logs on the identity server it should tell you where the request is coming from and give you a clue as to what redirect uri you need to add.

    "redirect_uri":"io.ionic.starter",
    "client_id":"IonicClient",
    "response_type":"token id_token",
    "state":"WJXbyxlvDI",
    "scope":"openid profile idserverapi offline_access",
    "access_type":"offline",
    

    You have set up io.iconic.starter you say your using http://localhost:8100/. I sugst you updated it and add http://localhost:8100