-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add supportal navigation #35410
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
Merged
Merged
Add supportal navigation #35410
Changes from all commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
eb42af8
adding new properties
danieldoglas fe65f54
adding new logic for setting supportal token on public pages
danieldoglas ad993ab
adding logic in case you already have a session
danieldoglas f5acfa8
converting accountID to Number
danieldoglas 9020de7
adding type of auth token to setSupportAuthToken
danieldoglas 214590e
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas 9343f30
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas 28c567f
adding logs
danieldoglas 0b896fd
fixing linter
danieldoglas a4a6ab1
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas 72391f0
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas 9b015a2
prettier
danieldoglas 53bcd57
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas 1553c7f
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas fde063a
fixes after merge
danieldoglas 807a030
remove unused file
danieldoglas 39c18b1
removing function setSupportAuthToken from network since it is alread…
danieldoglas 0a79955
creating new parameters for using on API request
danieldoglas 594693c
adding new method to call API with support token
danieldoglas a453d37
reusing function on signInWithShortLivedAuthToken
danieldoglas 234df26
prettier
danieldoglas fccc71e
calling right method now
danieldoglas e8401c1
changing to right method on login page
danieldoglas 51a84d3
prettier
danieldoglas fe97f39
changing method from getSupportAuthToken to isSupportAuthToken
danieldoglas f9b4116
simplifying token check
danieldoglas eaa9186
checking new method for support auth token
danieldoglas 25032f1
updating comment
danieldoglas e7fd9c9
prettier
danieldoglas 2bd4030
DRYing the types
danieldoglas 2826307
adding token types to the const file
danieldoglas b00fe7b
changing method to isSupportTAuthToken to check the type from const
danieldoglas d7400f4
changing type to use valueOF const
danieldoglas 8dc2f7e
changing usages to constant
danieldoglas 61f0b39
updating usage to const
danieldoglas 0956d29
separate set and clear support auth token
danieldoglas d136642
prettier
danieldoglas 6eada6e
using finally data
danieldoglas 286d4b8
addressing the last reference to supportal to use const
danieldoglas 0e03fc5
changing inheritance to reference
danieldoglas 533bff2
undo changes to ref
danieldoglas f1772a0
readding optional parameters and fixing routes to include central pan…
danieldoglas 42e0295
removing explicity typing
danieldoglas 53e8803
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas aa31296
using new parameter of authtokentype
danieldoglas 7bd9d4b
adding key for new translated item
danieldoglas 1c8bcf1
exporting function to check if it's supportal
danieldoglas 2a34120
changing text based on which type of token we're using
danieldoglas c052286
creating new keys for stashed sessiond ata
danieldoglas 65ad0ab
mapping new keys
danieldoglas 4258128
ignoring new keys when clearing the storage
danieldoglas 226f6aa
adding logic to restore stashed login
danieldoglas e5b27b5
passing new parameters to stash login
danieldoglas 4760635
using the whole session object so we can store it easily
danieldoglas 0930f3c
logic should work
danieldoglas 54db30b
adding one more check on the translation key
danieldoglas 463fcb4
returning promise on signin redirect
danieldoglas caf1cf6
using promise to wait before setting the stashed data on session and …
danieldoglas bb51ff6
fixing message that should be shown
danieldoglas ddc3271
changin order on login page so we can check if it's supportal first
danieldoglas 2df9180
passing parameter to store stashed login data
danieldoglas 5a5d5bf
Removing stashed keys from clear storage
danieldoglas 0240d99
removing transition from history on logout previous user page
danieldoglas 907b2e4
removing transition from route on loginWithShortLivedAuthToken
danieldoglas 25021a3
add additional logic to Session to confirm we're stashing credentials…
danieldoglas 61ec184
Add propertitieson authscreen to guarantee we're executing the right …
danieldoglas ffb1d56
adding spanish translation
danieldoglas eed0aaf
prettier
danieldoglas e7b135f
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas f06e890
linter
danieldoglas 573bbb5
setting settion import as type
danieldoglas 6d63941
refactor function for simplicity
danieldoglas a5f45b2
prettier again
danieldoglas 114aee3
renaming property to clearer name
danieldoglas 4af67a9
removing check if it's supportal call when enhancing the parameters
danieldoglas 20b943d
setting parameters as optional
danieldoglas 6fd8978
DRYing functions
danieldoglas 992ed3a
DRYing functions
danieldoglas 2931b5e
getting function back to network
danieldoglas 9904a01
Merge branch 'main' into dsilva_addSupportalNavigation
danieldoglas 205cb7f
fix comment after merge
danieldoglas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| type SignInWithSupportAuthTokenParams = { | ||
| authToken: string; | ||
| }; | ||
|
|
||
| export default SignInWithSupportAuthTokenParams; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,8 +169,9 @@ function AuthScreens({session, lastOpenedPublicRoomID, isUsingMemoryOnlyKeys = f | |
| const shouldGetAllData = !!isUsingMemoryOnlyKeys || SessionUtils.didUserLogInDuringSession(); | ||
| // Sign out the current user if we're transitioning with a different user | ||
| const isTransitioning = currentUrl.includes(ROUTES.TRANSITION_BETWEEN_APPS); | ||
| const isSupportalTransition = currentUrl.includes('authTokenType=support'); | ||
| if (isLoggingInAsNewUser && isTransitioning) { | ||
| Session.signOutAndRedirectToSignIn(); | ||
| Session.signOutAndRedirectToSignIn(false, isSupportalTransition); | ||
|
Comment on lines
+172
to
+174
Contributor
Author
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. I thought it was strange we had to add this here, but while testing, around 30% of the times we called |
||
| return; | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.