File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed
Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ Requests to the `/eval` endpoint will be routed to the Teacher Tool dev server.
1313
1414Debug and step through Teacher Tool code using the browser dev tools (F12 to open).
1515
16+ To skip having to log in on localhost, add ` ?noauth=1 ` to the end of the url.
17+
1618
1719## Test in staging environment
1820
Original file line number Diff line number Diff line change @@ -64,15 +64,23 @@ export const App = () => {
6464
6565 useEffect ( ( ) => {
6666 async function checkAuthAsync ( ) {
67- // On mount, check if user is signed in
68- try {
69- await authClient . authCheckAsync ( ) ;
70- } catch ( e ) {
71- // Log error but continue
72- // Don't include actual error in error log in case PII
73- logError ( ErrorCode . authCheckFailed ) ;
74- logDebug ( "Auth check failed details" , e ) ;
67+ if ( pxt . BrowserUtils . isLocalHostDev ( ) && / n o a u t h = 1 / i. test ( window . location . href ) ) {
68+ dispatch ( Actions . setUserProfile ( {
69+ id : "?"
70+ } ) ) ;
7571 }
72+ else {
73+ // On mount, check if user is signed in
74+ try {
75+ await authClient . authCheckAsync ( ) ;
76+ } catch ( e ) {
77+ // Log error but continue
78+ // Don't include actual error in error log in case PII
79+ logError ( ErrorCode . authCheckFailed ) ;
80+ logDebug ( "Auth check failed details" , e ) ;
81+ }
82+ }
83+
7684 setAuthCheckComplete ( true ) ;
7785 }
7886 checkAuthAsync ( ) ;
You can’t perform that action at this time.
0 commit comments