Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login callback #4

Open
Duat72 opened this issue Jan 2, 2023 · 0 comments
Open

Login callback #4

Duat72 opened this issue Jan 2, 2023 · 0 comments

Comments

@Duat72
Copy link

Duat72 commented Jan 2, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant