Hello, I'm trying to use the `solidus_auth_devise`...
# support
s
Hello, I'm trying to use the
solidus_auth_devise
confirmable module, I want to force the user to confirm before logging in, I follow this instructions
# ==> Configuration for :confirmable    # The time you want to give your user to confirm his account. During this time    # he will be able to access your application without confirming. Default is nil.    # When confirm_within is zero, the user won't be able to sign in without confirming.    # You can use this to let your user access some features of your application    # without confirming the account, but blocking it after a certain period    # (ie 2 days).     # config.confirm_within = 2.days
so I settled on
config.confirm_with
on
0.days
but I get this error
Courriel translation missing: fr.activerecord.errors.models.spree/user.attributes.email.confirmation_period_expired
when I click on the confirmation link
w
Did you try adding the missing translation to your
config/locales/fr.yml
file?
s
Yes I added 🙂 but the problem is not the translation but rather the behavior. I am looking for a way to force the user to validate his email address before being able to sign in
e
@Sabo I’m a bit confused by the
0.days
shouldn’t it be the timespan in which the user has a chance to click the confirmation link? With 0 days it will be impossible to confirm… maybe
24.hours
?
☝️ 1
s
@elia Yes, that's what I thought too, I think I misunderstood the sentence
# When confirm_within is zero, the user won't be able to sign in without confirming.
I will try with :
Copy code
config.allow_unconfirmed_access_for = 0.days
config.confirm_within = 2.days
e
yeah, probably better to also have a look at the devise official documentation, can easily be just a typo
👍 1
s
Yes I will look the devise official documentation, thank you for your help @waiting_for_dev @elia :)
👍 1
🙌 1