spring-projects / spring-projects/spring-security

Support Remember-Me for OAuth2 login

Open
#15,078 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: oauth2 type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

When OAuth2 login is enabled, remember-me parameter (ie when it's not set to always remember) will not be honored, because the original request (to /oauth2/authorization/<provider>) is different from the actual request coming back from the OAuth2 provider (to /login/oauth2/code/<provider>), and that second request does not have the remember-me parameter set.

It would be good if this could be supported, ie when calling /oauth2/authorization/<provider>?remember-me=true, the response would set the remember-me cookie.

Expected Behavior

Remember-me cookie is set on OAuth2 login response

Current Behavior

Remember-me cookie is not set on OAuth2 login response

Context

My application offers optional OAuth2 login, along with traditional username/password login. There is a checkbox for remember-me, but this does not apply to OAuth2 login currently.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the request flow from /oauth2/authorization/<provider> through the callback at /login/oauth2/code/<provider>, focusing on how the remember-me parameter is carried between them. Done means calling the authorization endpoint with remember-me=true results in a remember-me cookie on the OAuth2 login response.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.