Suggestions on how to implement user authentication with PHP as a backend


#1

As of now I am using a PHP MVC Framework in the Backend (Codeigniter), moreover, I haven’t made it RESTful for some reasons.

So my question is for devs using a PHP backend, how have you implemented user authentication? Moreover, how do you create sessions? I just want to know how it can be done. Any articles or suggestions in this direction would be greatly appreciated.


#2

I haven’t seen any articles on this subject. Ember.js & PHP is something that I’m very interested myself.

The answer to your question would probably be to look at how its done with jQuery and CodeIgniter and go from there.

I’ll tweet this on Ember Sherpa to see if someone has some experience with this in particular.

Also, there is this, but its not specific to PHP in any way https://github.com/heartsentwined/ember-auth


#3

Just saw your tweet, thanks a ton @tarasm! I am hopeful of some positive replies as I haven’t seen much articles on Emberjs & PHP. The place where I did my last internship, the guys there implemented the same stack I am using but the difference was that, that their backend was RESTful. I will try to take some ideas from them as well & contribute here.


#4

I’d be hard pressed to imagine a scenario where you wouldn’t want to build a RESTful API. Is it just lack of experience or a specific feature requirement?


Show a list of resources and change url on scolling to a specific resource like Discourse
#5

Actually the reason being, I don’t have much knowledge about RESTful APIs & I am using this stack for a college project. I would have used simple jQuery & Codeigniter but Ember is way more elegant & clean.


#6

But you already have experience with Ember, right?


#7

Same thing applies to Ember, I am not much experienced with it.


#8

Ember has architecture that takes some time to understand. Be careful about taking on Ember on a tight timeline.

Its gotten a lot easier after 1.0 but still, it takes a bit of time.

if you do decide to take this on, then I can direct you to some resources to help you learn.


#9

I feel that I understand some bits of it though I still need to wrap my head around things like Bindings, Computed Properties or Observers.

Oh yes, some up to date resources would be really helpful. You have been very kind, thanks! :smile:


#10

You’re welcome. If you can tell me a bit about what you’re creating, then I can tell you where you can start.


#11

Sure, I can tell you. I am actually creating a kind of add on for an Animation conference which will enable the members to create projects and teams, add members to the teams etc. It’s called Pipeline & Team Generator.


#12

That’s quiet a project. How much time do you have?


#13

Though we are supposed to present this project to a team of Professors first in around mid November, then it will go live next year around June.


#14

Sounds like an interesting project. It would definitely be better to use Ember for something like this.


#15

Oh yes, it is. I plan to have something like a real time job board with Nodejs possibly if everything goes according to plans.


#16

Node.js is probably a better choice than PHP for a backend for this kind of an app.


#17

You’re right though, but since I don’t have much time to play with it I decided to stay away from it for a while.


#18

There is a framework for Node.js called fortune.js that allows to build an API. You might be able to pair it up with ember-auth.


#19

Looks interesting but I don’t know why I am afraid to touch something like Nodejs.


#20

if you have some skills in PHP, MVC and OO, you can have a look at https://github.com/iwalz/zf2-doctrine2-getting-started i don t think the project is maintained, but you can easily redo it by following an up to date tutorial from scratch, he is based on zf2 and doctrine2, and it’s a bug tracker sample project …

auth can be easily integrated with zf existing module like zfcUser.