Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit eafa13c

Browse files
author
vikasrohit
committed
AS#100297043256582, Move all login to link of Members to accounts.topcoder.com
-- preventing state change until the promise is resolved to allow token to be available for all api calls.
1 parent 22dde37 commit eafa13c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/topcoder.module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import { getCurrentUser, loadUser } from './services/userv3.service.js'
5151
logger.debug('checking auth for state: ' + toState.name + ' from state: ' + fromState.name)
5252
var currentUser = getCurrentUser()
5353
if (!currentUser && toState.data && toState.data.authRequired) {
54+
event.preventDefault();
5455
loadUser().then(function(token) {
5556
logger.debug('successful login with token ' + JSON.stringify(token))
5657
$rootScope.$broadcast(CONSTANTS.EVENT_USER_LOGGED_IN)

0 commit comments

Comments
 (0)