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

Ionic + in app browser + cookies = doesn't work #162

Closed
otupman opened this issue Jun 7, 2015 · 3 comments
Closed

Ionic + in app browser + cookies = doesn't work #162

otupman opened this issue Jun 7, 2015 · 3 comments

Comments

@otupman
Copy link

otupman commented Jun 7, 2015

Found an interesting problem while trying to use ng-token-auth with cookie storage on Ionic but using ng-cordova-auth to handle my oauth process - the cookies get wiped. At least they do on Android. And, of course, having come out of the auth process ng-token-auth has lost it's auth tokens.

This appears to be due to the default configuration of the in-app-browser where it will clear the cookie cache before opening up the "new" browser window.

It's a bit of a pain to find this problem as it'll only appear once one deploys to an emulator or device.

Options I see are:

  • Detect the presence of the cordova object and maybe console.warn the developer
  • Include a note in the README.md either in the config section about the storage option
  • Create a Cordova-specific section somewhere in the README to collect and deal with these (edge?) cases

I could do any of those, just not sure which is most appropriate.

@posixpascal
Copy link

👍 +1 for cordova specific readme section.

@booleanbetrayal
Copy link
Collaborator

We're working on inAppBrowser support in an upcoming PR ... See also Issues #90 and #141 for tracking other implementations / etc. Going to close this, as documentation is also being addressed in the PR.

@booleanbetrayal
Copy link
Collaborator

The PRs are in for ng-token-auth #188 and devise-token-auth (lynndylanhurley/devise_token_auth#323). Please try these branches out and let us know if there are any issues in implementation. Will merge soon if no major issues are found!

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

3 participants