Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with ngCookies #166

Closed
HoplaGeiss opened this issue Jun 13, 2015 · 5 comments
Closed

compatibility with ngCookies #166

HoplaGeiss opened this issue Jun 13, 2015 · 5 comments

Comments

@HoplaGeiss
Copy link

I understood from your FAQ, that ng-token-auth is using ipCookie instead of ngCookies. However I am wondering why I can't use ngCookies and ng-toke-auth together ?

Since I use ng-token-auth I keep having unknown provider errors.

screenshot from 2015-06-13 14 35 16

@piyushchauhan2011
Copy link

Same Problem here, when can we use ng-token-auth with ngCookies ?

@HoplaGeiss
Copy link
Author

I just changed everything to use ipCookie.

@posixpascal
Copy link

Since the latest merge of master you can now write your own custom storage method by implementing 3 methods:

var ngCookieStorage = {
    persistData: function(key, val){
        return $cookies.put(key, val);
    },
    retrieveData: function(key){
       return $cookies.get(key);
    },
    deleteData: function(key){
       return $cookies.remove(key);
    }
};

// on your ngTokenAuth config object set:
{
    "storage": ngCookieStorage
}

see #138 for more informations about this.
thank you @sgtpepper43 by the way.

@booleanbetrayal
Copy link
Collaborator

Closing this as there's now a mechanism that should accommodate any persistence implementation desired.

@piyushchauhan2011
Copy link

Thanks for the clarification :+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants