-
Notifications
You must be signed in to change notification settings - Fork 82
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
Ability to user-authenticate via headers:authorization #195
Comments
hi @jaideepdas, not sure if I understand your situation correctly, but you are trying to get the accessToken in Loopback, not sure if this issue is tackling the same issue. And btw we only accept |
This is kinda feature request. To test my angular app which is auth protected I need phantom to be able to set access token. So it will be a good feature if the sdk finds a access token in the header of the request, even if we haven't used .login() function of the sdk to authenticate we can authenticate the user based on the header value if its valid. |
Sorry @jaideepdas, I have reopened the issue as it does seem like a feature request, but I'm unsure if I understand what you are suggesting. If you could clarify more of the context of the SDK feature you would like to see? |
I am saying how about both, we check both, if server is sending authorization then use that, if there is no authorization header but local storage has then use that. |
@jaideepdas right, I believe its much clearer now,
Okay that make sense, would you mind changing the title to something more inline of a feature request, maybe something like, and maybe to briefly describe the context of change in the description as well.
I believe there will also be some decision needs to be made for what receives precedence in different scenarios. Thanks |
regarding pull request I am not sure what you mean by that, you want me to work on this change and send a pull request ? |
@jaideepdas yes if you don't mind that would be great, then we can discuss implementation and concerns in the PR as well. One more clarification, are you trying to bypass using the LoopBackAuth login and use the Or you are trying to become @bajtos any thoughts? |
Could you please suggest a stop gap solution so that I wrap up my task. |
@jaideepdas Sorry for the late reply, is this still an issue for you? I'm not too sure the best way to solve this I believe you can put a workaround at https://github.com/strongloop/loopback-sdk-angular/blob/master/lib/services.template.ejs#L289-L295 |
yeah issue remains but this functionality is put on hold, but thanks for the suggestion. but shouldn't we put this feature in the sdk itself instead of people putting individual hacks. |
@jaideepdas yes we have labelled this as a feature request, but unfortunately we have quite a backlog of feature requests and bug fixes, there are no promises that this can be delivered in a timely manner. |
Unfortunately we don't have bandwidth to implement this feature ourselves. Contributions are welcome though! |
I am working on a app where I have to use phantomjs to download the view as pdf, now for phantomjs able to render the page I need to pass access_token to the api, as its a angular app using the loopback sdk. Is there a way I can set the auth_token for the app to login.
I am using https://github.com/sgentle/phantomjs-node on the server side and have tried by setting the header also like this
But unable to make the app login using the token.
The text was updated successfully, but these errors were encountered: