creimers / graphene-auth-examples

Examples of authentication and authorization with django graphene
MIT License
67 stars 11 forks source link

superuser can not login ? #3

Closed bobyltr closed 7 years ago

bobyltr commented 7 years ago

Hi, The apps work well with https://github.com/creimers/graphene-auth-examples-relay I tried to create superuser with python manage.py but it does not work. Is there any special issues?

Thanks,

creimers commented 7 years ago

Why does it not work? What kind of error are you getting?

bobyltr commented 7 years ago

Email address: test@test.com Password: Password (again): Superuser created successfully.

But from http://localhost:8000/admin/login/?next=/admin/ can not login, there is no error showing at all ...

creimers commented 7 years ago

You're right. It has something to do with the last entry in the MIDDLEWARE settings. That's a custom middleware there for JWT auth. Comment it out and you'll be able to log in. You will need it, however, for the graphql authentication to work.

So indeed, this is a bug. I will look into it.

bobyltr commented 7 years ago

I login now ... Thanks,

I am looking forward to seeing how you solve this. BTW, my understanding, graphQL-graphene tries to replace REST. Do you think so?

creimers commented 7 years ago

Can you give it another try now? It should be fixed.

Indeed, graphql is a API alternative to REST and tries to solve some of its shortcomings. Will it replace REST? We'll see...

bobyltr commented 7 years ago

It works like charm ! What is your next step for this project? I am learning Apollo... thinking about data loaders, subscription to improve the efficiency of query.

creimers commented 7 years ago

I'm using some functionality of this project for a little side project of mine - adventstagram.com. Using it there with relay in the frontend. I have not really looked into apollo yet, but it should be a good alternative to relay.

bobyltr commented 7 years ago

I just make an Account, UI is elegant. It look like famous Instagram/Django. There must be some thing innovative right?

creimers commented 7 years ago

Well it's a progressive web app (work in progress...), so to some extend, depending on the OS and the browser, it will also work offline, among other things.

bobyltr commented 7 years ago

I am using safari, the network here at this moment is relatively slow, but the performance is not bad. I see Facebook/Relay now working offline on mobile very interesting... Hope your app will perform well too. I am trying to learn this new things ... Would be nice to learn from you to make something new here in Vietnam 👍