setup-sdk
- Javascript
- Kotlin
- Swift
npm i @loginid/websdk3
Import and initialize an instance:
import { LoginIDWebSDK } from "@loginid/websdk3";
const lid = new LoginIDWebSDK({
baseUrl: process.env.LOGINID_BASE_URL,
});
First, ensure you have the Maven Central repository in your project's settings.gradle.kts file:
repositories {
google()
mavenCentral()
}
Next, add the SDK and required dependencies to your app module's build.gradle.kts:
dependencies {
// LoginID SDK
implementation("io.loginid:auth:1.0.1")
}
Import the class within your application:
import io.loginid.auth
class MainActivity : AppCompatActivity() {
val lid = LoginIDAuth(this, "<LOGINID_BASE_URL>")
override fun onCreate() {
super.onCreate()
// Additional setup...
}
}
Add the SDK dependency using Swift Package Manager in Xcode:
- In Xcode, open your project.
- Go to File → Add Package Dependencies….
- In the search bar, paste:
https://github.com/loginid1/loginid-ios
- Select the target(s) where you want to add the SDK and click Add Package.
Import the class within your view models:
import LoginIDAuth
@main
struct MyApp: App {
private let lid: LoginIDAuth
init() {
LoginIDAuth(baseUrl: "<LOGINID_BASE_URL>")
// Other setup code...
}
}