DEV: Update auth-complete to use public router service (#24436)

`router:main` is private and has an unstable API (e.g. the `didTransition` event does not fire in Ember 5)
This commit is contained in:
David Taylor 2023-11-20 13:27:00 +00:00 committed by GitHub
parent 18461e38cf
commit ff3204cc91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -37,8 +37,8 @@ export default {
} }
if (lastAuthResult) { if (lastAuthResult) {
const router = owner.lookup("router:main"); const router = owner.lookup("service:router");
router.one("didTransition", () => { router.one("routeDidChange", () => {
next(() => { next(() => {
const options = JSON.parse(lastAuthResult); const options = JSON.parse(lastAuthResult);
@ -46,7 +46,7 @@ export default {
return; return;
} }
if (router.currentPath === "invites.show") { if (router.currentRouteName === "invites.show") {
owner owner
.lookup("controller:invites-show") .lookup("controller:invites-show")
.authenticationComplete(options); .authenticationComplete(options);