Login via username

authentication

#1

Hi,
I’ve noticed there is a “username” field in the database, is it possible to make a login request using this username and not an email?

Thanks


#2

@adib currently only email is supported for login.


#3

Hi,
Thankyou for your reply.


#4

@adib there is some discussion of this right now actually, we don’t have timeline but I’m sure if you subscribe to DF Newsletter you’ll receive release notes pretty regularly to stay apprised of when this might release.


#5

Thank, I’ll be sure to subscribe. I use dream factory on two of my ongoing project and I’m planning to use it on my future projects. It really speeds up the development time.


#6

@adib this has been implemented as of our last release, check it out!


#7

Awesome. Thank you very much.


#8

How to use new session login with username?


#9

Hi,
I’ve been trying to setup login using the username. I’ve changed the .env file, I also change the setting in the “service-system-config” . When I called /user/session using username I’ve still got an error “Login request is missing required email”. Is there any step that I miss? Thanks


#10

Whoops. My Bad. I actually forget to uncomment the line in .env file. Now It works gorgeously!.


#11

Hi everybody,

@adib, Can you explain a bit more. I try to make the same things, but it doesn’t work.
I put DF_LOGIN_ATTRIBUTE=username in files ‘.env’ and ‘.env-dist’. I check ‘Login with Username’ in Service -> System -> Config. All services have been restarted.
But when I POST { "username": "my_username", "password": "secret" } on /user/session
I always have error 400 : Login request is missing required email.

Did I miss something ?

PS: I work with DF 2.7.0-1 on windows


#12

Ok My Bad.

Just forgot to execute
php artisan cache:clear
php artisan config:clear
php artisan df:setup