Thank you for the follow-up, James. Everything seems to be much more stable now.
There’s just 2 things we’re trying to achieve now:
- is improve the login UX via the Lock - we’d like it if Lock could prefill the e-mail field for the passwordless login.
Also for some reasonrememberLastLogin
does not seem to work (I know it can’t work for passwordless, but it should still remember the last Google login, correct?).
I found a similar issue here Hosted Passwordless with prefill of email address? and went through the source code for Lock. It looks like the prefill logic is there, but isn’t working for some reason?
- we can’t seem to properly configure the post-registration hook to fire (we’re aware that hooks are still in beta). We’ve configured the hook roughly based on the example rule (slack notification on sign-up):
module.exports = function (user, context, cb) {
const SLACK_HOOK = 'https://hooks.slack.com/services/###/#######'
const slack = require('slack-notify')(SLACK_HOOK)
const text = `:tada: New sign-up: ${user.username || user.email} (${user.email})`
const channel = '#uustulnukad'
slack.success({ text, channel })
// return right away; Slack's API call will finish running in the rule's sandbox
cb(null, user, context)
}
We’ve resorted to using Hooks instead of Rules because the example Rule for sign-up slack notifications didn’t contain context.stats
in the login context, so we were getting notifications for every login (even auth renewals).