-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Provide an OAuth implementation for native apps #175
Comments
+1 I'm having issues with with devise mappings which might be related (#166). Btw. would you mind sharing your implementation on a gist or somewhere? |
@nicolas-besnard - how would you suggest going about this? |
You'll find my implementation here. This is what I'm currently using in production. Work so far. This is a simple modification of the existing Omniauth controller which is just rendering JSON instead of redirecting. |
Thanks @nicolas-besnard - I'll look into this tonight. |
I'm not sure it's the proper way to do it, it was just convenient to do it
|
@nicolas-besnard - what is the best way to provide tests for this? Will we need to create iOS + Android apps for the test suite? |
I already done this for iOs if you want to take a look |
Oh that's great! Thx 👍 |
What would be a downside of having a http header provided by requester? For instance if a client provides some header i.e |
@c0mrade - I'll probably end up doing something like that. |
I still don't understand why this redirection exists ... On Tue, Mar 10, 2015 at 9:39 PM Lynn Dylan Hurley [email protected]
|
When you are logged-in with Facebook, you can fetch an "access_token" from Facebook. I send it back to : You'll have to use the gem omniauth-facebook-access-token. |
I'd to reimplement my own omniauth controller to make it works. Has I said On Tue, Mar 31, 2015 at 1:14 PM [email protected] wrote:
|
Yes, it's the one ! |
You'll need to configure the omniauth-facebook-access-token gem On Tue, Mar 31, 2015 at 1:38 PM [email protected] wrote:
|
Hi, I have implemented the metod described by @nicolas-besnard commented on 10 Mar. status = :ok
status = :created if @is_new_user
render json: { user: @resource.as_json.merge(is_new_user: @is_new_user) }, status: status I modified to that: render json: { user: @resource.as_json.merge(is_new_user: @is_new_user), expiry: @expiry, client_id: @client_id, auth_token: @token}, status: status And I don't know how to return securely the acces token, uid, expiry and client to make a request. |
@nicolas-besnard, have you work it out how to allow user to login via I have tried to use But I got this error said that |
@lynndylanhurley would a solution (pull request) working around @nicolas-besnard gist work |
@chirag7jain - I'm actually working with @nbrustein on some PRs for devise_token_auth as well as ng-token-auth what should resolve all these inAppBrowser OAuth issues. To give you a sense of the changes, you can see the commit against the ng-token-auth client code here: lynndylanhurley/ng-token-auth@40a7f08 |
@booleanbetrayal how far are you on these changes? I can help if needed but not on "angular / js" end |
@nbrustein and I should be finishing up the devise_token_auth work today. We'll leave the two changesets in PRs in respective projects for comments before merging into master. |
This just got merged as #323 which allows for client-specified OAuth flows (inAppBrowser, sameWindow, newWindow). Going to go ahead and close this but feel free to open new issues if needed Pushed as v0.1.33 btw! |
I think there's work to do on the omniauth implementation. Currently, the gem use a strange HTML page with a redirection.
Ok, this is working for AngularJS, but you can't t use this with iOs or Android application. I've tried, and it end up creating my own Omniauth Controller.
Moreover, there's a lot a issue created with Omniauth as a cause.
To conclude, I think we should think about refactoring the Omniauth part of this gem;
The text was updated successfully, but these errors were encountered: