Skip to content

Commit

Permalink
[HCD 525] - Clearing authId
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-win87 authored Jun 5, 2024
1 parent f6170c7 commit 95b3292
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,17 @@ In Obj-C that'd be:
This way, if we already have consent for that token (`"JohDoe"`) we'll bring the consent profile from the server, overwriting whatever was stored in the device.
>If required for your app's log out process, your organization can call the `clearAllData` method to erase local data:
>```obj-c
>// Objective-C
>[SPConsentManager clearAllData];
>```
>```swift
>// Swift
>SPConsentManager.clearAllData()
>```
>Once cleared, your organization can then call `loadMessage` to collect consent from a non-authenticated user or `loadMessage` with a new `authId` for a new authenticated user.
## Sharing consent with a `WKWebView`
After going through the message and consent flow (ie. after `onConsentReady`) the SDK will store the consent data in the `UserDefaults`. That data can then be injected into `WKWebView`s so the web portion of your app doesn't show a consent dialog and it'll contain the same consent data as the native part.
Expand Down

0 comments on commit 95b3292

Please sign in to comment.