File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const LS_LANG_KEY = `afLanguage`;
2121const MAX_CONSECUTIVE_EMPTY_RESULTS = 2 ;
2222const ITEMS_PER_PAGE_LIMIT = 100 ;
2323const AUTOLOGIN_QUERY_PARAM = 'autologin' ;
24+ const START_OAUTH_QUERY_PARAM = 'start_oauth' ;
2425
2526export function getAutologinCredentials ( autologin : unknown ) : { username : string , password : string } | null {
2627 if ( typeof autologin !== 'string' ) {
@@ -117,6 +118,12 @@ export async function redirectToLogin() {
117118 if ( currentPath !== '/login' && currentPath !== homePagePath ) {
118119 query . next = next ;
119120 }
121+
122+ const currentQuery = router . currentRoute . value . query ;
123+
124+ if ( START_OAUTH_QUERY_PARAM in currentQuery ) {
125+ query [ START_OAUTH_QUERY_PARAM ] = ( currentQuery [ START_OAUTH_QUERY_PARAM ] as string ) ?? '' ;
126+ }
120127
121128 await router . push ( { name : 'login' , query } ) ;
122129}
You can’t perform that action at this time.
0 commit comments