-
Notifications
You must be signed in to change notification settings - Fork 32
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: stevepolitodesign/rails-authentication-from-scratch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: mdchaney/rails-authentication-from-scratch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 7 commits
- 14 files changed
- 1 contributor
Commits on Jun 12, 2024
-
Adds current_active_session helper.
Closes #93, "Why is the ||= removed? current_user method". This adds memoization back to current_user / Current.user, plus causes log out when the current session is destroyed.
Configuration menu - View commit details
-
Copy full SHA for 100dc0c - Browse repository at this point
Copy the full SHA 100dc0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4e6e7b - Browse repository at this point
Copy the full SHA c4e6e7bView commit details -
Adds assertions for remember_me cookie.
Asserts cookie is http_only, secure, and same-site is "strict". Closes #87.
Configuration menu - View commit details
-
Copy full SHA for 2e6e5b0 - Browse repository at this point
Copy the full SHA 2e6e5b0View commit details -
Prevent reuse of confirmation token.
Closes #86. The issue is that signed tokens have a simple payload by default that doesn't verify anything other than the record id and the token's purpose. This can lead to a security challenge as the token can be used to confirm anything that has the same "purpose" for that record. An example would be someone changing their email address to an email address that they don't control. Using one account, they change the email to an email address that they control and get the confirmation token. They then change the email to one that they can't access and use the token from the first request to "confirm" the second request. The tokens can be used any number of times as long as they're used before expiration. With this change, the email address is included as plain text in the request, as well as being used as part of the "purpose" in the token. The second request fails because the plain text email address is used to constrain the signed lookup. If they change the plain text email address in the link then the message will fail to be validated as the "purpose" won't match. Either way, the token is usable only for confirming the original email from the token's creation.
Configuration menu - View commit details
-
Copy full SHA for 9f1432a - Browse repository at this point
Copy the full SHA 9f1432aView commit details
Commits on Jun 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 97e7a32 - Browse repository at this point
Copy the full SHA 97e7a32View commit details -
Configuration menu - View commit details
-
Copy full SHA for d99e033 - Browse repository at this point
Copy the full SHA d99e033View commit details -
Configuration menu - View commit details
-
Copy full SHA for 51cb1ed - Browse repository at this point
Copy the full SHA 51cb1edView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main