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

Look into integrating with Ember Simple Auth #111

Closed
jwngr opened this issue Aug 22, 2014 · 15 comments
Closed

Look into integrating with Ember Simple Auth #111

jwngr opened this issue Aug 22, 2014 · 15 comments

Comments

@jwngr
Copy link

jwngr commented Aug 22, 2014

http://ember-simple-auth.simplabs.com/

@srsgores
Copy link

+1

@oskarrough
Copy link
Contributor

That would be amazing.

@brancusi
Copy link
Contributor

+1

1 similar comment
@andressrg
Copy link

+1

@jayphelps
Copy link
Contributor

This project should prolly be callled ember-data-firebase-adapter cause AFAIK simple-auth integration would be outside the scope as intended. It's not related to ember-data in any way. I'm sure someone could certainly make a new project that offers this functionality as a mixins though.

@hayd
Copy link

hayd commented Oct 17, 2014

Are there any examples of how oath can be done with ember+firebase? It seems like (potentially) only a small amount of wiring may be needed even without seemless simple-auth integration. :s

@jwngr
Copy link
Author

jwngr commented Oct 17, 2014

Hey all, we are actively working on integrating EmberFire with our Firebase login feature. I apologize that it has taken a little longer than expected, but we have someone actively working on it and we will hopefully have this new feature shortly.

@hayd - In the meantime, you can just use our regular JavaScript library to do authentication. Ember after all is just JavaScript. The link I shared above has a ton of documentation on how to authenticate users. The methods should work fine in your Ember code without anything special. Note that the new authentication features require Firebase 1.1.x, not 1.0.x. If you are still on an older version of Firebase, you will need to also include our deprecated Firebase Simple Login library. I definitely suggest upgrading to the latest version if you can though!

It should be very easy to get up-and-running! Feel free to ask questions on the EmberFire Google Group if you run into issues.

@tstirrat
Copy link
Contributor

Please look to the torii-fire library for integrating auth. It should be usable via the ember-simple-auth torii adapter.

@tstirrat tstirrat closed this as completed Apr 3, 2015
@jamesdixon
Copy link

If anyone's interested, I just released a custom Firebase authenticator for Ember Simple Auth. You can find it here: https://github.com/jamesdixon/ember-cli-simple-auth-firebase

At this time, it only supports Firebase's email + password authentication.

@yankeeinlondon
Copy link

where has this gotten to? I'm trying to use ember-simple-auth 1.0 (fully rewritten from prior versions) and want to plugin firebase but can't quite get my head around it.

@jamesdixon I'll try your addon but it was clearly written in the pre-1.0 era so fingers crossed it still works as needed.

@jamesdixon
Copy link

@ksnyde yeah, i hope it works, but can't make any guarantees. Unfortunately, I'm not using Firebase any longer, so I have no plans to update it. That said, more than willing to accept a PR if it needs/you want to update it.

@cs3b
Copy link

cs3b commented Mar 20, 2016

@ksnyde did you get it up and running?

So far I was able to configure

ember-simple-auth with torii ( I've generated authenticator ) next I wrote my component

// layout/authentication-widget/component.js
import Ember from 'ember';

export default Ember.Component.extend({
  session: Ember.inject.service(),

  actions: {
    signIn: function (provider = "google") {
      this.get("session").authenticate('authenticator:torii', 'firebase', {provider: provider});
    },
    signOut: function () {
      this.get("session").invalidate();
    }
  }
});

And the popup invocation works good - I can make authentication with google, and when popup is closing I'm getting:

onTransportReturned@http://localhost:4200/assets/vendor.js:76679:17
onMessage@http://localhost:4200/assets/vendor.js:76065:15
EventListener.handleEvent*ns.wrapper/fb.login.transports.util.addListener@http://localhost:4200/assets/vendor.js:75796:7
ns.wrapper/fb.login.transports.Popup.prototype.open@http://localhost:4200/assets/vendor.js:76074:3
ns.wrapper/fb.login.AuthenticationManager.prototype.requestWithTransports_@http://localhost:4200/assets/vendor.js:76674:3
ns.wrapper/fb.login.AuthenticationManager.prototype.authWithTransports_@http://localhost:4200/assets/vendor.js:76642:3
ns.wrapper/fb.login.AuthenticationManager.prototype.authWithPopup@http://localhost:4200/assets/vendor.js:76547:3
ns.wrapper/Firebase<.authWithOAuthPopup@http://localhost:4200/assets/vendor.js:80328:3
_toPromise/<@http://localhost:4200/assets/vendor.js:101747:9
initializePromise@http://localhost:4200/assets/vendor.js:63666:7
Promise@http://localhost:4200/assets/vendor.js:65516:7
_toPromise@http://localhost:4200/assets/vendor.js:101724:14
open@http://localhost:4200/assets/vendor.js:101707:18
proxyToProvider/</<@http://localhost:4200/assets/vendor.js:118475:17
initializePromise@http://localhost:4200/assets/vendor.js:63666:7
Promise@http://localhost:4200/assets/vendor.js:65516:7
proxyToProvider/<@http://localhost:4200/assets/vendor.js:118474:14
authenticate@http://localhost:4200/assets/vendor.js:98622:14
authenticate@http://localhost:4200/assets/vendor.js:98978:14
authenticate@http://localhost:4200/assets/vendor.js:99711:14
signIn@http://localhost:4200/assets/merit-money.js:118:9
Component<.send@http://localhost:4200/assets/vendor.js:51658:28

Not sure what is the problem - hard for me to debug.

@yankeeinlondon
Copy link

I decided I didn't need simple-auth and just used torii to firebase. Been using it for several months now and it works well.

@cs3b
Copy link

cs3b commented Mar 20, 2016

@ksnyde I figure out what was the problem - to make long story short - issue was with google credential, one letter was missing (my bad). Still debugging was hard for me ( first time I was looking into ember-simple-auth and torii source code). My bad was that I didn't capture reject on promise that authenticate return - it would be more easier to spot the problem.

In the end it looks very good - all that I did before was done correctly: authenticator, torii-adapter, component (and it works as I expect). I picked ember-simple-auth as I know that in the end I might not be using firebase authentication (before in one of the project I've use torii session service, just like you, and it works fine).

If ever would need any assist, just let me know - I might write a tutorial how to setup this one, as I didn't found anything in the internet.

@yankeeinlondon
Copy link

glad you got it sorted. it's always these simple mistakes that take the longest to unwind. :)

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