K
Kinde2w ago
bazar21

How to process an action post sign-up or login

I am looking to save new user details once a usr sign-up to my site. As of now I see there is a way to do that here: https://docs.kinde.com/developer-tools/sdks/frontend/javascript-sdk/#handle-redirect But where am I supposed to put the codebelow? on_redirect_callback: (user, appState) => { console.log({user, appState}); if (user) { // render logged in view } else { // render logged out view } }; I sense I am missing something as I don't have a proper place to put this into as my sign-up/login/logout works ok, just need to save new sign-up details in database and need a place to put that action on a post sign-up event.
Kinde docs
JavaScript SDK
Our developer tools provide everything you need to get started with Kinde.
4 Replies
IkiTg07
IkiTg072w ago
Hello, So basically you have two options : - You use the post_login_redirect_url to send your user to a callback page in which you'll handle this logic on your server - You use a webhook (see here: https://docs.kinde.com/integrate/webhooks/add-manage-webhooks/)
bazar21
bazar21OP2w ago
ok thx,let me try.
IkiTg07
IkiTg072w ago
Feel free to ask for more help if needed
bazar21
bazar21OP2w ago
ok I chose to insert functionality on page configured at post_login_redirect_url and so far ok. please remind me how to close the post

Did you find this page helpful?