0

My goal is to send the user to a different page/route other than the oauth default after invalidation. Currently the default is my root login page. How can I change this?

I have this logout code in app/controller/protected.js. Specifically the .invalidate(); method is what I'm trying to modify.

import { inject as service } from '@ember/service';

export default Controller.extend({
    session: service(),

    actions: {
        invalidateSession() {
      this.get('session').invalidate();

        }
  }
});

This is my code in app/routes/protected.js

import Route from '@ember/routing/route';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';

export default Route.extend(AuthenticatedRouteMixin, {
});

Any help is much appreciated!

2
  • I'm confused. Isn't Ember Simple Auth doing a full page refresh on invalidation by default? Commented Feb 23, 2020 at 0:35
  • try this.transitionTo('your.target.route.here') Commented Feb 27, 2020 at 6:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.