Display plain text token in modal after creation
I have a model which generates a Sanctum token after the model's
created
event fires. However, I want to show the plain text token to the user in a modal. Is there any way to do this currently?6 Replies
No. That would create a security issue. Just like a password, the hash can’t / shouldn’t be decoded. Only checked against.
To clarify, I only want to do this at the moment is created, which is necessary for the user to actually use the token. I'll give them the ability to regenerate it but never see the plain text again. Regardless, what I'm really asking is if there is a way to execute an action and then put the output of that action in a modal rather than a notification
Have you found a solution? Currently trying to figure out the same
I would say to use a notification to send it providing you have it in an after state action or similar
@qilir No I don't have a way to use a modal for this yet. @toeknee That is essentially what I've settled on for now. The main reason that I want to use a modal is to provide a little extra information which gets pretty long on a notification. I also generally think of notifications as helpful but ignorable information but relaying the token to the user is critical in my case
So build a notification livewire component which shows a modal when data is pushed to it?