apache / apache/grails-core

Switch user targetUrl config to redirect after login/logout

Open
#15,895 3 comments 0 reactions 0 assignees View on GitHub
relates-to:spring-security
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### Feature description

Hi, I was wondering if it's possible to add two new parameters to set a targetUrl to redirect after login and logout. Something like:

`grails.plugin.springsecurity.switchUser.afterLoginTargetUrl`
`grails.plugin.springsecurity.switchUser.afterLogoutTargetUrl`

This configurations are only to customize that behaviour, otherwise the plugin takes the value of: `grails.plugin.springsecurity.switchUser.targetUrl`

If it's possible, just point me the right direction and I will make a PR.

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Locate the switch-user implementation and existing targetUrl configuration, then trace the login and logout redirect paths; done means separate after-login and after-logout settings override the shared targetUrl while retaining it as the fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, spring
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.