OneEntry Platform 2.0.1 Help

Registration and authorization

Kotlin Multiplatform

Registration

With the CMS and events properly set up, this code will create a new user and send a verification code to their email.

AuthProviderService.signUp( marker = "email", formIdentifier = "email_auth" ) { formData { locale("en_US") { put("name", AttributeValue.fromString("OneEntry")) } } authData { put("email", "sample@oneentry.cloud") put("password", "password") } notificationData( email = "sample@oneentry.cloud", phonePush = listOf("HUVehvuevhw...vfiaphbOUVH"), phoneSMS = "+09999999999" ) }

Activation

Immediately after registration, you need to activate the created user by passing the otp code to the activate method.

AuthProviderService.activate( marker = "email", userIdentifier = "sample@oneentry.cloud", code = "123456" )

Authorization

AuthProviderService.auth("email") { put("email", "sample@oneentry.cloud") put("password", "password") }

Swift

Registration

With the CMS and events properly set up, this code will create a new user and send a verification code to their email.

try await AuthProviderService.shared.signUp( marker: "email", formIdentifier: "email_auth" ) { FormDataContainer { Locale("en_US") { FormData(marker: "name", attribute: .init(string: "OneEntry")) } } AuthDataContainer { AuthData(marker: "email", value: "sample@oneentry.cloud") AuthData(marker: "password", value: "password") } NotificationData( email: "sample@oneentry.cloud", phonePush: ["HUVehvuevhw...vfiaphbOUVH"], phoneSMS: "+09999999999" ) }

Activation

Immediately after registration, you need to activate the created user by passing the otp code to the activate method.

try await AuthProviderService.shared.activate( marker: "email", userIdentifier: "sample@oneentry.cloud", code: "123456" )

Authorization

try await AuthProviderService.shared.auth(marker: "email") { AuthData(marker: "email", value: "sample@oneentry.cloud") AuthData(marker: "password", value: "password") }
Last modified: 18 February 2025