Commit 5059fb8
committed
Redirect users to original request after login
This commit does two things:
1. It passes `origin: request.url` into the `github_auth_url()` named
route, which will preserve that request and return it with the
OmniAuth hash.
2. The `create` action on the sessions_controller then either redirects
to the originally requested URL or, if that doesn't exist, to the
old default `posts_url` named route.1 parent fd305aa commit 5059fb8
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments