-
Notifications
You must be signed in to change notification settings - Fork 19
Add tenant-aware admin login with multi-identifier and session limits #795
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -41,7 +41,7 @@ module.exports = class UserSessionsHelper { | |||||||||||||
| if (accessToken !== '') { | ||||||||||||||
| userSessionDetails.token = accessToken | ||||||||||||||
| } | ||||||||||||||
| if (accessToken !== '') { | ||||||||||||||
| if (refreshToken !== '') { | ||||||||||||||
| userSessionDetails.refresh_token = refreshToken | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+44
to
46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Guard against null/whitespace refresh tokens before persisting The new check prevents empty strings, but null/undefined or whitespace strings could still slip through from some call sites. Persist only non-empty, trimmed strings to keep DB clean and consistent. Apply this diff: - if (refreshToken !== '') {
- userSessionDetails.refresh_token = refreshToken
- }
+ if (typeof refreshToken === 'string' && refreshToken.trim() !== '') {
+ userSessionDetails.refresh_token = refreshToken.trim()
+ }📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.