The flow
- Your app asks your backend for a signature for the current customer.
- Your app calls
GleanFeed.identify(...)with that signature. - Glean Feed verifies it and opens authenticated views for that customer.
identify throws a typed GleanFeedError on failure; handle the error and continue anonymously when appropriate. Call GleanFeed.logout() when the customer signs out of your app. It clears Glean Feed identity and stored SDK tokens, not your app’s authentication.
The signature (server-side)
Same contract as the web widget. If the customer has an email, trim and lowercase it, then sign this compact JSON array:Sign with the same
userId you pass to identify. When email is present, sign its trimmed,
lowercased form; Glean Feed applies that same canonicalization to the submitted email before
verification.Confirm identity
Afteridentify returns successfully, present feedback and submit or vote as the test customer. In the Glean Feed dashboard, open the request and confirm the expected customer is attached. Then call GleanFeed.logout(), reopen the view, and confirm the SDK returns to signed-out portal behavior.