Closed tahini closed 2 months ago
I will let @greenscientist review this one
We need to document a bit more the configuraiton format for the "regex" If your example, you use: tokenFormat: /^[\d]{10}$/gi But the regex part is really just "^[\d]{10}$", the rest is specific to the regex engine used and could have quite different meanings. (I'm not fully sure we want people to be able to use the g to be able to match multiple lines of content.
I just realized the configs are documented in chaire-lib-common, so it's been added there.
This cleanly adds the authentication method with token. It adds a user in the auth model with the token as username (this avoids adding a new field to the user table). Relogging with the same token in the URL will cause the user to log back in with the same user data.