Hey,
Is there a way to use the wf open external website function and pass the authenticated user’s token ?
I’m sending the user to a dashboard made with React that fetches bubble’s data and needs user authentification but would prefer not to ask user to reconnect if they were already connected.
This dashboard will be hosted on a subdomain of the bubble app.
Why don’t you use JWT? You can pass the JWT via url parameter and you decode it in the second app with the shared secret
Thank you, how can I pass the JWT ? Is it a bubble native feature or do i need a plugin ?
1 Like
you can create the JWT using this plugin. Bubble Plugin Editor - JWT json web token (BTW we made it )
In Bubble:
- Generate JWT Token:
-Use a backend workflow or API workflow to create a JWT containing user data calling the plugin that I linked.
-Include: user ID, email, expiration time, and any needed permissions
-Sign with a secret key shared between both apps
- Pass Token via URL:
you can pass it with send data to page and you call it “token” for example ( in the workflows)
https://dashboard.yourdomain.com?token=YOUR_JWT_TOKEN
Or use POST method to send token in request body for better security.
- Workflow Setup:
Action: “Open external website”
URL: Your dashboard URL + token parameter
Target: New tab/same tab as needed