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.
4 Replies
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/)
ok thx,let me try.
Feel free to ask for more help if needed
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