payton / django-siwe-auth

A complete Django authentication system overhall for Web3 utilizing Sign-In with Ethereum.
MIT License
26 stars 6 forks source link

Question about django admin login #15

Closed qingfeng closed 2 years ago

qingfeng commented 2 years ago

Excuse me, after the authentication is switched to django-siwe-auth, what should I do for the django admin login?

payton commented 2 years ago

Ah, that's a tricky one @qingfeng. I'll create a separate ticket to hopefully override the admin login page (I believe that's doable)...

What I have done until then is:

1) Set your user in the DB to be an admin 2) Authenticate with your app's login screen (non-admin page) so that you have a session token 3) Go to the admin login page and you should already be authenticated given the session token

In development, I've done most of my model changes in a python shell or on the database directly instead of via the admin panel.

qingfeng commented 2 years ago

OK

  1. I need to complete wallet connect first
  2. Set the user as superuser in the database and set a password
  3. I will visit the admin login page to log in again

That's the way to go, right?