Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThe OP was asking how to "generate" new passwords automatically for new users. What you're doing here is setting every new user's password to "password". Sure it's encrypted in the database, but you're going to be super vulnerable to dictionary (guessing) attacks. If you instead generate unique passwords using tokens (I.e. generate_token) you're extremely secure since these tokens are rather long and complicated (mixed character types, not dictionary based, etc.).
      singulars
    2. COIt looks to me like he's asking how he can input generated usernames and passwords, and have them handled by Devise. He specifically asks: "how can the generated usernames/passwords recognized by Devise?" which I took to mean: We've already got a generated list of usernames and passwords, but I don't know how to get that info inserted into the database so that devise will recognize it. What I'm showing above is simply that all the background encryption and such will be handled by Devise, no need to go through the backend DB.
      singulars
    3. COAnd I was __definitely__ **NOT** suggesting that they use "password" for every new user. Hope that's not the way it came across. That is indeed an incredibly poor way of adding new users. I originally thought that the 'generate_token' was for generating the encrypted_password, since the OP was hinting at having direct access to the DB (bypassing ActiveRecord all together).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload