Support case-insensitive tokens?
My token generator uses only uppercase letters and numbers. When hand-entering the token, sometimes the user is lazy and writes letters in lowercase, which I want to allow. I'm supporting this by re-implementing Passwordless::Session, but it'd be nice if this was a configuration option.
I think this could be an okay addition behind a config flag. Default is current implementation, so something like config.case_insensitive_tokens = true.
PRs welcome.
WIP at https://github.com/mikker/passwordless/pull/249
I've just spent some time debugging after a few user reports of code entry trouble, turns out it was this and people were naturally just 'expecting' case insensitivity! Very keen on this PR, might even be worth calling it out somewhere clearly in the readme as I feel like it's possibly a common tripwire for people?
(Edit: On closer inspection the detail included in the PR there is probably enough)
I'm very fortunate to have an early adopter of my app who correctly pivoted to matching case. My stop gap fix is just including my own copy of session.rb (basically the PR version) in the app for now. Would be happy to return to vanilla in a future version if this is merged.
Nice yeah, I've just been testing a modified version without the config since I only want the upcase version as the default anyway — seems good so far.