Hi Folks,
Can someone give me some advice for adding properties from the server side to the Spark user, please?
We have an Intercom integration with our app, and we're setting up secure messaging, which requires us to send a hash to the JS. My JS for Intercom is contained within a 'defer' Vue component.
So I'd like to be able to generate the hash, with the following on the server side in PHP:
hash_hmac('sha256', $user->email, 'secret')
Then, attach this hash to a Spark user object property, so it's accessible in the JS using:
Spark.state.user.intercom_hash
Would appreciate any advice. Thanks.