Hey so I have simple auth and I want my index page to be only for users that are logged in and instead of redirecting them to the login page I want them to be redirected to my welcome page. All other pages that they are not authorized to use i want them still sent to the login page. It is only different for my index page. I tried doing an if statement and a redirect in the index.js route but nothing seems to work. I would really appreciate the help. Thanks in advance.
UPDATE
ok so I did some research and I figured out what i needed to do by I cant seem to get it working.
import Ember from 'ember';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
import Configuration from 'ember-simple-auth/configuration';
import ENV from 'myApp/config/environment';
ENV['ember-simple-auth'] = {
authenticationRoute: 'welcome'
};
export default Ember.Route.extend(AuthenticatedRouteMixin);
so i tried to change the configuration and have it redirect to a welcome page like so. However it still brings me to the login page. What am I doing wrong?
yes I am aware thank you. I was saying though that I wanted to redirect to a different page other than the login for only that page though. that is the issue I am having.
I think you should be able to use session as a service and determine whether user is signed in and do redirect in Route definition. Can you paste what have you tried so far?