silent_grave
silent_grave

Reputation: 638

New user Registration & Authentication on Android app with django Backend

I wish to implement a registration (and then authentication) for a new user who uses my android app. A django based framework is sitting on the back-end.

The workflow is the same as any other app:

From the backend, it is required for user to be authenticated(logged in) to use most of the functionality. Moreover, a decent level of security is also a requirement. From the django side, this task is fairly easy for HTML pages due to built in registration views and decorators. However, my question is how to implement this for android. I am in total fix regarding the workflow of the entire system.

From what I've searched on internet, people suggest two things as solution to this:

  1. Develop on HTML and use android's webview for this entire thing.
  2. Use POST request to send User ID & Passwd to backend. The workflow after that is unclear to me since I can't use django's inbuilt system with it (CSRF protection, auth etc.)

Now the problem is that I have not implemented any website for the application, and I am more comfortable doing it on mobile app. I have gone through numerous tutorials on auth, outh and REST packages of django, but all of them seem to be tailored for webapp.

My question is: What is the mot suitable flow considering app has to be for professional use ?

Upvotes: 8

Views: 6712

Answers (2)

silent_grave
silent_grave

Reputation: 638

I ended up using REST framework for Django with Token Authentication.

Upvotes: 1

kmmbvnr
kmmbvnr

Reputation: 6139

You can build REST API for django signin/registration process.

One of the packages that can help you with that is https://github.com/sunscrapers/djoser

Upvotes: 5

Related Questions