Skip to content

logout event should not be called at init time #36

@ronanquillevere

Description

@ronanquillevere

Hello,

I am building a single page app where you need to be logged in on every page. So on every one of my route I check if the AccessToken has been set, otherwise I redirect to the Oauth login page using the EndPoint service. After being logged, when I am redirected towards my app I have a route for retrieving the accessToken that set it to the AccessToken with AccessToken.setTokenFromString(token) as described on your webpage.

So I never really use the "sign-in" button. But I want to use the "logout" button.

On logout, I want to add the redirection towards the logout url. So I thought I was going to listen the the logout event and do a $location.path(myLougoutUrl);

Problem is the logout event is fired inside the initView() method. So after loggin, I am redirected towards my app that send the logout event at initialization then as I listen to that event then I am redirected towards the logout url automatically :(

I think logout event should NOT be fired inside initView()

I hope I was clear enough. Maybe this can be merged with issue about adding logout url

P.S. Thx for the lib :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions