This repository was archived by the owner on Apr 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,10 +37,12 @@ export default function checkAuth<T extends ConcreteSubclass<Route>>(
3737 // Need to handle view-only links before checking auth, and this is the only reasonable place to do it.
3838 // This limitation points toward replacing this decorator with a service method meant to be
3939 // called in Route.beforeModel. Decorator mixins should probably be considered an anti-pattern.
40- const { viewOnlyToken = '' } = this . paramsFor ( 'application' ) as Record < string , string > ;
40+ let { viewOnlyToken = '' } = this . paramsFor ( 'application' ) as Record < string , string > ;
4141
4242 try {
4343 if ( ! this . session . isAuthenticated || this . currentUser . viewOnlyToken !== viewOnlyToken ) {
44+ // This is for ENG-8174 where occasionally a %2F or / is at the end of the viewOnlyToken
45+ viewOnlyToken = viewOnlyToken . replace ( / ( % 2 [ f F ] | \/ ) $ / g, '' ) ;
4446 this . currentUser . setProperties ( { viewOnlyToken } ) ;
4547
4648 // Check whether user is actually logged in.
Original file line number Diff line number Diff line change @@ -478,7 +478,7 @@ function fakeCheckCredentials(
478478async function emulateUserDoingOAuthFlow ( authorizedAccount : ModelInstance < AllAuthorizedAccountTypes > , schema : Schema ) {
479479 await timeout ( 1000 ) ;
480480 // eslint-disable-next-line no-console
481- console . log ( 'Mirage addons view: emulateUserDoingOAuthFlow done' ) ;
481+ console . info ( 'Mirage addons view: emulateUserDoingOAuthFlow done' ) ;
482482 const currentUser = schema . roots . first ( ) . currentUser ;
483483 authorizedAccount . update ( {
484484 credentialsAvailable : true ,
You can’t perform that action at this time.
0 commit comments