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:
parent
18461e38cf
commit
ff3204cc91
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue