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

Log my user via token and session to share login over 2 app #1062

Closed
kgeoir opened this issue Jan 10, 2018 · 5 comments
Closed

Log my user via token and session to share login over 2 app #1062

kgeoir opened this issue Jan 10, 2018 · 5 comments

Comments

@kgeoir
Copy link

kgeoir commented Jan 10, 2018

Hello,
My post is not about a bug but more an architecture question:
I am having a rails app with this gem (version: 0.1.42) and an other app in ionic using angular2-token (version: 0.2.0-beta.14). I am planing to put my ionic app accessible via web-browser and I'd like to know how can avoid my user to log twice (once in my rails app via devise session, then on the app using devise token)
I had some though like sharing a cookie, passing args in url but nothing seems very secure. Do you any advise?

@zachfeldman
Copy link
Contributor

Can you explain further by giving us an example, including what kind of device and screen resolution you'd be doing this with?

@kgeoir
Copy link
Author

kgeoir commented Jan 10, 2018

My target is at the end of the day be able to develop for web and app seamlessly. To do so, my plan is to have a main website with let's say a marketing front and an API. This main website would be host on mysite.com. When user registered and paid, they will acces to the app which could be an android app, an ios app or a website hosted on app.mysite.com. (the login here use devise_token on mysite.com)
All of this works already but for more comfort, I would like to allow my users already logged on mysite.com to access app.mysite.com without having to enter their login/pwd again.
What I see here is to hide somewhere the devise_token and share it with app.mysite.com via cookie or in url.
I was wondering if you don't have better idea to do so and how to do it in a clean way.
tks

@zachfeldman
Copy link
Contributor

Hey @kgeoir , no I don't think devise_token_auth provides this functionality out of the box. You'd have to implement something yourself.

@kgeoir
Copy link
Author

kgeoir commented Jan 11, 2018

Yep, it is not realy something that this gem should provide. Do you have any hint, I am not keen to share auth token in a cookie or as argument in urls.

@zachfeldman
Copy link
Contributor

@kgeoir ok, this isn't really a forum for general questions, it's an issue tracker for problems with this gem. Please try stack overflow, closing this as off-topic. Good luck

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

2 participants