We’re developing an application where users can log into a cloud service to connect to their home device. To do this, users need to provide proof of ownership for their devices.
When signing up with the cloud service we wan’t to register ownership claims with the user’s metadata. We already understand that we can…
register the ownership metadata using the management api
extract metadata into custom claims in the user’s access token using a post-login action
What’s unclear is how this can be done right after initial signup. It would be nice- if possible- if we could register the user metadata and force-retrieve a new access token. Alternatively, it would be nice if we could register additional user metadata during signup, i.e. when the user logs in for the first time.
Hope the question makes sense, looking forward to an interesting answer!
After researching a bit more it seems that pre-user-registrationwith a machine-to-machine trigger might be a technical approach to enrich the required data before the token is issued, however Pre-user Registration Trigger says:
You cannot currently use pre-user-registration Actions to add metadata to passwordless users.
I assume passwordless refers to social login (which we’d like to use).
The Pre-user Registration Trigger can only be triggered by a Database Connection or a Passwordless Connection. While the action cannot add metadata to users from the Passwordless Connection, it will still be able to trigger the action; a social connection will not even trigger this action.
A Post-user Login Action can be triggered from any Connection.