Skip to content

Login callback #4

Open
Open
@Duat72

Description

@Duat72

Note: in https works.

In the client configuration I have set : options.RequireHttpsMetadata = false;

I started all 4 projects in http, when I log in starting from the Movies.Client project I am correctly redirected to the login page but when I enter the username and password it passes the authentication but remains on the login page emptying the fields.

public async Task Login(LoginInputModel model, string button)
{
if (context != null)
{
if (context.IsNativeClient())
{
// The client is native, so this change in how to
// return the response is for better UX for the end user.
return this.LoadingPage("Redirect", model.ReturnUrl);
}

                    // we can trust model.ReturnUrl since GetAuthorizationContextAsync returned non-null
                    return Redirect(model.ReturnUrl); //<--- this is callback point 
                }

}

value of model.ReturnUrl:

/connect/authorize/callback?client_id=movies_mvc_client&redirect_uri=http%3A%2F%2Flocalhost%3A5002%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20address%20email%20roles%20movieAPI&response_mode=form_post&nonce=638082631024847403.NDhkZTliZGQtOTE2OC00Y2ZlLThiN2YtMjY4NWRlMTg0YTlmMTdkN2EyY2UtZDYzYS00NzFmLTk2MWItMTZlMTEwZDk2M2Vh&state=CfDJ8HOOEFXrK5JKrX5f57CzT1FtIUsTzOTxm2gOAg4X-k7wBtJuSXuswiJBTp5S4n2BlvdyhDx7uncp7fa488eL-VOiapqglHfovIarcThh_wlf6o5aW7SEe2LN6hOfxHqHZdVopMpQxk6cBP63rE8Sr-3Qpth4H5U9rGTE6cW8jgKU0is03N95sZMFSCpGm1pGH7y_29gMQ2qfmFZOLr0w3sZeV9w9RwfteJ-2cAItNwV3BXuo6HcY38POd4lrjucuLGnfPCFYQSHcyx2WISdVFRQ3eLrhM-bw_SB4KCX8xPhc&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.15.1.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Duat72

        Issue actions

          Login callback · Issue #4 · aspnetrun/run-aspnet-identityserver4