Sessions is temporarily moving to YouTube, check out all our new videos here.

Authmaker

Chris Manson speaking at EmberFest in October, 2017
52Views
 
Great talks, fired to your inbox 👌
No junk, no spam, just great talks. Unsubscribe any time.

About this talk

If you want to turn your Ember app into an Ember Authmaker app, there's an add-on for that. Watch how in this Lightning Talk.


Transcript


Right. A few people who might know me might have heard me talk about this before. I do bang on about a little bit but will try and run through it in five minutes today. Quick thing. Don't have time to go into too much back story. That's me, that's my dog. You may have seen that I sent around a survey earlier on and I did that because I like graphs and I wanted people to see this. It's a bit small, but, This is Google Drive here. Essentially I wanted to see how many people actually had side projects or are, like, thinking about side projects and doin' stuff like that. Blue is, I've got a projects folder with side projects, weekend things. Not surprising. Got a lot of creative people here. One of the next questions was, how many of them use Ember? And this is like almost all of my side projects. And this like more than 30%, 30 to 60. So, Ember conference, lots of Ember side projects. It makes sense. One thing that I was a little bit surprised about was that not a lot of people use Node here. Ruby's the real thing, Ruby on Rails. Yeah, please don't boo me off the stage. But there are some people who do use Node3. But the real meat of what I was asking was, how many people are thinking about a project they wanna start, and are kind of okay with a little bit of restrictions as to what kind of technology they want to use. And, you know, when this started there was only one person, and I was like, "Oh God, what am I doing?" But, there are seven people in this room who might be able to use Authmaker. Come talk to me, anybody who said yes to that. There's a few things that we all know when we wanna start a new Ember app, we do Ember new. We get all this lovely stuff and then we just start up and yay, we can start building our application. If you want to turn your Ember app into an Ember Authmaker app, well, there's an add-on for that. You add this into your Ember app and then there's a few configurations that you'll do. It's a Ember Simple Auth extension. As we all tend to use Ember Simple Auth. The next step, and this is why I asked the question about would you be willing to use Node. I've gone a little bit further and I've created myself a yeoman generator for a Node back-end. So you can use JavaScript in the front-end and JavaScript in the back-end. And when you generate this express app, it asks you a few fun questions and ultimately generates something that looks a little bit like this. Nice and simple, gives you a model, gives you roots. But the meat of the idea is this. This is an example of an instance root. This is the start of it. This actually builds a CRUD system for you completely. It works as CRUD, JSON API so your Ember app just works favourably with it. It's fantastic. This will allow anybody to create, find, delete, everything so there's no authentication in this. So, back to the idea of Authmaker. How do we add the Authmaker configuration into this root? We add an authentication block. And, again, there's an app for that. We've got an Authmaker-verify-express that does the login for you. It checks to see of you've got an access token on the request. And, in this case, it checks to see if you've got the instance management feature. You're allowed to do that. That might be a paid-for feature or something like that. This stops anybody from finding anything that they don't have that permission, essentially. The next question. Authentication is only the first step. Authorization is the next step. So, with this little hook here, it stops you from being able to see other people's instances, in this case. So, when you do, find, it always add this, userID, is your userID to the query before it gets to the database. And then, obviously, if you're needing this userID to be added to every instance, when you're doing a create, you just add it into the, and that's JSON API-style, body manipulation there, So, again, this is now a fully-featured root that was generated and you can see, if you know what you're doing with this, you should be able to start up really quickly and create a bunch of these roots. That's kind of the front- and back-end side of it, but then what is Authmaker? Authmaker is ... You log into the Authmaker app, You give us a little bit of details about your app, where it's gonna be, all this sort of stuff. And it also gives you a local configuration so you can do the local host 4200 thing. When you create that, it gives you the configuration to drop into your Ember app and then, hey presto, you get something like this! So this one of our clients using Authmaker and you can see ... Well, they've actually changed a sign-up to apply because, they're a funky kind of startup-style thing. Using Authmaker, you're able to log straight into your app. So, we actually built this for them, but all of the authentication and authorization part of it is dealt with by Authmaker itself. You can get started really quickly using this thing. So, the reason why I want to chat quickly about it and the whole point of me putting out that survey, is those seven people who said, yes ,they're thinking about starting an app, come talk to me. I need more people to try this out. I've just hired somebody to help me build it. The documentation. They're a junior straight out of a boot camp. I want them to kind of express their experience on how they approach the problem. I don't want to come at it from somebody who's built the whole thing and knows too much about it. So, I want more people like that. People who don't know Authmaker, who want to build apps and give me feedback. We're at an early stage and we want as much feedback as possible. That's it!