-
Notifications
You must be signed in to change notification settings - Fork 22
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
Ember CLI support #20
Comments
Yes you can absolutely use this in an EmberCLI app. I'm currently using it in several Ember 2.0 apps. The README show how to setup ember-oauth2 using both a CLI module based app and a using a global. For EmberCLI you need to setup your configuration in Then to setup your configuration in a initializer you would import the config/environment file to have access to your login information.
The RediredctURI should be wherever your OAuth2 endpoint should redirect back to your app. The OAuth2 end point should respond with the I recommend taking a look at ember-token-auth which implements many of the default login features required to use ember-oauth2. If you look at the test/dummy app it shows how to use |
Thanks, @amkirwan |
There are a couple of ways to handle it but I think using a redirect handler is best. Using the examples here when the redirect url for the app is called it will first load the
then from wherever you called authorize in your app you trigger('redirect') for example like this. It is taken from ember-token-auth the route - login.js
|
Does anybody use this library with Ember CLI app?
What should be added to the RedirectURI template?
The README uses global App variable approach which doesn't work for CLI applications.
The text was updated successfully, but these errors were encountered: