1

I have embedded an iframe in the source code of each person added to my People plugin

I am looking for a way to conditionally render a button based on who the logged-in user is. If the email of the logged-in user matches the email in the iframe's param then the button ('Click here to update Profile') should appear. Otherwise, it is not on the page when the logged-in user views other people.

Buildfire People Plugin

I looked through the public api docs and tried using the /auth/verify_credentials but this is for logging in, this will not return the email of the logged-in user.

I know buildfire SDK has a buildfire.auth.getCurrentUser(callback) function that can be used. I need the callback to send that info to another application.

The app that I created is deployed on netlify and the backend is deployed on heroku.

Ha Pham
  • 11
  • 1
  • Assuming you aren't violating any security policy. Couldn't you just use the SDK to get the current user and either send it in the iframe in the query string or just call a REST API? – Daniel_Madain Nov 25 '20 at 21:36
  • The project I am working on only uses the plugins available from the marketplace. I learned that I could use buildfire.auth.getCurrentUser(callback) method in the source code. So I am working with that. Thank you for taking the time to answer my question! – Ha Pham Nov 26 '20 at 23:28

0 Answers0