Authentication for mobile devices

30 views
Skip to first unread message

Deep Shah

unread,
Apr 22, 2016, 9:09:13 AM4/22/16
to Django users
I am new to Django. I want to know how will authentication work on mobile apps. How do I keep the user logged in on my mobile apps and not make them login every time? Is there any in-built method to save a token or something?

Steven Crockett

unread,
Apr 22, 2016, 10:41:29 AM4/22/16
to Django users
If you are writing a native app, and using Django as a backend web service, there is no built-in library within django, as far as I know.
I have used https://github.com/jpulgarin/django-tokenapi with some success. It is rather secure as long as you are using https in production.

Chris Bartos

unread,
Dec 27, 2016, 4:54:26 PM12/27/16
to Django users
Hi Deep,

In order to authenticate on mobile applications, you'll need to create an REST API and authenticate using Token Authentication or OAuth2 Authentication (Social Media: Google, Facebook, Twitter, etc.). How Token Authentication works is you will create an REST API on a Secure HTTP site with a route to a built-in view that sends the user's token. You can keep the Token saved for the duration of the session within the mobile app and it will prevent the user from logging out.

I hope that works!
Chris

On Friday, April 22, 2016 at 9:09:13 AM UTC-4, Deep Shah wrote:
Reply all
Reply to author
Forward
0 new messages