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

Feature request: Persistent external authentication sessions #14860

Open
gvkries opened this issue Dec 8, 2023 · 2 comments
Open

Feature request: Persistent external authentication sessions #14860

gvkries opened this issue Dec 8, 2023 · 2 comments
Milestone

Comments

@gvkries
Copy link
Contributor

gvkries commented Dec 8, 2023

Is your feature request related to a problem? Please describe.

Currently, external authentication with providers is session-based, requiring users to manually sign in after closing the browser. Unlike local Orchard accounts, there's no option to persist the login cookie for external providers.

Describe the solution you'd like

Introduce a configuration option or a checkbox on the login form to enable users to keep the external authentication cookie for an extended period. This feature mirrors the existing functionality available for local Orchard accounts. Consider reusing the existing checkbox for this purpose to maintain consistency.

Describe alternatives you've considered

Alternatively, consider implementing a mechanism to challenge the last used external provider, akin to the scenario when only one external provider is available and the option UseExternalProviderIfOnlyOneDefined is enabled. To achieve this, an additional persistent cookie storing the last used authentication method may be necessary. The advantage of this approach is that it relies solely on the existing persistence settings of the external provider.

@sebastienros
Copy link
Member

there's no option to persist the login cookie for external providers

But these don't use cookies. And it would but up to these providers to support persistant authentication tokens.

@kevinchalet is that a thing?

@sebastienros sebastienros added this to the backlog milestone Dec 14, 2023
@gvkries
Copy link
Contributor Author

gvkries commented Dec 14, 2023

SignInManager<TUser>.ExternalLoginSignInAsync() sets a local cookie and allows to specify it as persistent, using the same expiry settings as with a local account. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.signinmanager-1.externalloginsigninasync?view=aspnetcore-8.0

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

No branches or pull requests

2 participants