Ok so this is the login flow of the user:
- User visits /login
const config = {
authRequired: false,
auth0Logout: true,
secret: env.auth_secret,
baseURL: env.auth_base_url,
clientID: env.auth_client_id,
issuerBaseURL: 'url',
};
app.use(auth(config));
- User logs in or signs up through the login prompt created by auth0
- When login is successfull webhook from auth0 sends data to /user/verified
const axios = require("axios");
const URL = 'https://0bg7-34-200-103-108.ngrok-free.app/user/verified';
exports.onExecutePostLogin = async (event, api) => {
try {
await axios.post(URL, {data: event, secret: event.secrets.webhook_secret});
} catch (error) {
console.error(error)
}
};
- In my backend i check if the user is verified or not
Question:
Lets say the user enters /login/someData/
How could i recieve someData in my /user/verfied endpoint?
I am using nodejs as my backend.