Authenticated consent allows your organization to tie an end-users consent preferences to a unique end-user identifier that will persist across authenticated (i.e. logged-in) devices. In this article, we will cover how to enable authenticated consent for:
The following requirements must be met In order to successfully utilize authenticated consent between web and app properties:
Properties using authenticated consent must use the same vendor list
The consent scope for the vendor list should be set to Shared site (see below)
To implement authenticated consent on a web page, you can write a cookie directly on the page to pass the consent identifier to Sourcepoint.
document.cookie = "authId=123123123";
To implement authenticated consent on iOS devices, the
authId should be passed as a parameter when the
.loadMessage() function is initially called in our first class SDK for iOS.
//Example for SwiftconsentViewController.loadMessage(forAuthId: "JohnDoe")
//Example for Objective-C[consentViewController loadMessage for AuthId: @"JohnDoe"]
To implement authenticated consent on android devices, you will need to use the
.setauthId(string) function in the context of the
consentLib object when you run a new build.
//Example only. Your parameters should correspond to your propertyConsentLib.newBuilder(22, "mobile.demo", 2323, "6d1f92c8d85c4d41d7963412",this)//calling other .set methods.setAuthId("JohnDoe").build();
The SDK will bring the consent data from the server, overwriting whatever was stored in the device.
To implement authenticated consent for webviews, create a cookie with the
//iOS examplelet cookie = HTTPCookie(properties: [.domain: "mobile.demo.com",.path: "/",.name: "authId",.value: "JohnDoe",.secure: "TRUE:,.expires: NSDate(timeIntervalSinceNow: 42667037)])!webView.configuration.websiteDataStore.httpCookieStore.setCookie(cookie)