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

Token authentication #70

Open
statiklabs opened this issue Sep 29, 2011 · 40 comments
Open

Token authentication #70

statiklabs opened this issue Sep 29, 2011 · 40 comments
Milestone

Comments

@statiklabs
Copy link

Hi Noam. Great work on the Sorcery gem. Is token authentication something that would find it's way into Sorcery on day?

@NoamB
Copy link
Owner

NoamB commented Sep 29, 2011

Yes, it's been asked for a few times.
Since v0.7.0 is nearly done, it is set for v0.8.0.
The issue will stay here until it's done.
Thanks.

@statiklabs
Copy link
Author

Great to hear. I will keep plugging away with Sorcery then. Look forward to the 0.8.0.0 release!

Thanks for your hard work, making mine easier!

@theodorton
Copy link

Token authentication would be great for use with mobile app backends and Web Services :)

I'll try and look into this over the weekend. Maybe I can submit a pull request!

Anyway, +1 from me.

@henningms
Copy link

+1

Would love to see this feature, would really make mobile-development easier :)

@NoamB
Copy link
Owner

NoamB commented Mar 31, 2012

Hi,
I'm not getting to it...

I was thinking about an API like this:

require_login :token_allowed => true, :only => [:json]

This way it extends require_login to allow or disallow tokens, and only for
specific formats.

I would probably do it in a new submodule.

If anyone wants to 'lift the glove', it shouldn't be much trouble
implementing.

On Fri, Mar 30, 2012 at 3:19 PM, Henning M. Stephansen <
[email protected]

wrote:

+1

Would love to see this feature, would really make mobile-development
easier :)


Reply to this email directly or view it on GitHub:
#70 (comment)

@NoamB
Copy link
Owner

NoamB commented Mar 31, 2012

Actually require_login has all the options of a before filter, so I shouldn't touch 'only'.

Maybe another before filter, allows_token_authentication.

Not sure. How is it done in other gems?

@philostler
Copy link

Atm I'm building my app in the hope token authentication comes along before I start building my API.

Seeing this feature in there would be a massive +100 from me

@ADO
Copy link

ADO commented Apr 15, 2012

+1

Authlogic was a good one for this back in the day although it's methodology may be outdated now, I'm not sure: see Single Access Token module and Session Params module

@NoamB
Copy link
Owner

NoamB commented Apr 15, 2012

I'm thinking this design:

  1. on password creation/update create another field - auth_token
  2. a new before_filter - 'allow_token_authentication' needs to be placed in the controller (along with options like format and allowed actions). This sets some var for this controller, and when 'auto_login' is called under the hood, it will try to login from the auth_token as well.

Also the whole thing might be a new submodule and not in the default.

@philostler
Copy link

That design sounds ideal, only side note I'd say is allowing the auth_token to generated on request by the application as well and not just when the password gets touched.

@grigio
Copy link
Contributor

grigio commented Jun 28, 2012

+1
What do you think about integrate something like this http://railscasts.com/episodes/352-securing-an-api?view=asciicast

@lephyrius
Copy link

+1

1 similar comment
@trnc-ck
Copy link

trnc-ck commented Dec 12, 2012

+1

@lephyrius
Copy link

Now that sorcery 0.8.0 has been released how do I use this feature?
A tiny example would be nice. :)

@atrauzzi
Copy link

I'm curious as to the status of this. Think it's okay to manually implement my own token authentication using authenticate_or_request_with_http_token in my rails-api app in the meantime?

@davidchua
Copy link

I am working on an api using sorcery and this is certainly something I'd love to have.

@fzagarzazu
Copy link
Contributor

Hello everybody, hi Noam.

I just sent a pull request that adds supports for access tokens in RESTful JSON APIs and extends the external submodule to support OAuth 2.0 For Login (client side flow).

#415

I needed this for a pet project that I have been working on my free time, an angularjs app with rails-api as the backend server.

I would really appreciate if you guys could test it, code reviews would be great too.

Support for mongoid and mongomapper is included, but I don't use mongodb so if you plan to use it please do review the code to make sure everything works correctly.

Instructions are in the README.

Let me know what you guys think.

Regards,

@kristianmandrup
Copy link

@ fzagarzazu Awesome! +1

Would be nice with a small demo app on github demonstrating this feature :) Cheers!

@fzagarzazu
Copy link
Contributor

I have just published a quick demo with rails-api and OAuth 2.0 for login.

https://github.com/fzagarzazu/sorcery_access_token_demo

Hope it helps, regards,

@kristianmandrup

@mrcwinn
Copy link

mrcwinn commented Apr 21, 2013

+1

1 similar comment
@PapePathe
Copy link

+1

@ammancilla
Copy link

Any update about it?. +1

@kirs
Copy link
Collaborator

kirs commented Dec 23, 2013

I have plans on this feature, but it will probably be in 1.x release.

@ammancilla
Copy link

Glad to know that! Thanks for your work.

@nathanpsouza
Copy link

This was implemented?

@holden
Copy link

holden commented Nov 24, 2014

What's the status of this awesome feature?

@FUT
Copy link

FUT commented Dec 16, 2014

Three years have passed :) I am sure it will be easier to implement app-specific solution

@arnvald arnvald modified the milestones: 1.x, v0.8.0 Jan 18, 2015
@volisoft
Copy link

Is token authentication planned for 1.x release?

@Mehonoshin
Copy link

Seems that we should use some custom implementation of tokens :)

@arjayx
Copy link

arjayx commented May 24, 2016

hi excelent work. Thanks

I was wondering, if was implemented this feature ?

@Ch4s3
Copy link
Contributor

Ch4s3 commented May 24, 2016

@arjayx the gem is transitioning to new maintainers, is this a useful feature for? If a few folks weigh in, it will make it onto the 1.0 roadmap. @Mehonoshin, @volisoft, and @FUT, are you all still using Sorcery?

@Mehonoshin
Copy link

@Ch4s3 yep, still using

@Ch4s3
Copy link
Contributor

Ch4s3 commented May 24, 2016

@Mehonoshin would JWT/ruby-jwt integration work for you?

@volisoft
Copy link

@Ch4s3 I'm no longer using Sorcery

@Mehonoshin
Copy link

@Ch4s3 we've implemented some workaround, but anyway jwt looks good for token authentication

@Ch4s3
Copy link
Contributor

Ch4s3 commented May 24, 2016

@volisoft, if you don't mind me asking, what are you using now and what features does it provide that sorcery does not? Thanks @Mehonoshin.

@arjayx
Copy link

arjayx commented May 25, 2016

@Ch4s3 I wondered about feature Token for restfull api and be able to implement sorcery in projects that could have mobile clients

@Ch4s3
Copy link
Contributor

Ch4s3 commented May 25, 2016

@arjayx interesting, let me look into how people do that

@liyijie
Copy link

liyijie commented Jun 15, 2016

@Ch4s3 Is there any plan to support this feature? Thanks.

@Ch4s3
Copy link
Contributor

Ch4s3 commented Jun 15, 2016

I think its on the 1.0 agenda.

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

No branches or pull requests