customFunction

fun customFunction(payload: BsonDocument): Credentials

Creates credentials representing a login using an App Services Function. The payload would be serialized and parsed as an argument to the remote function. The payload keys must match the format and names the function expects.

Return

a set of credentials that can be used to log into an App Services Application using App.login.

Parameters

payload

The payload that will be passed as an argument to the server function.


fun <T> customFunction(payload: T, serializer: KSerializer<T>): Credentials

Creates credentials representing a login using an App Services Function. The payload would be serialized and parsed as an argument to the remote function. The payload keys must match the format and names the function expects.

Note This method supports full document serialization. The payload will be serialized with serializer and encoded with AppConfiguration.ejson.

Return

a set of credentials that can be used to log into an App Services Application using App.login.

Parameters

T

the payload type.

payload

The payload that will be passed as an argument to the server function.

serializer

serialization strategy for T.


Creates credentials representing a login using an App Services Function. The payload would be serialized and parsed as an argument to the remote function. The payload keys must match the format and names the function expects.

Note This method supports full document serialization. The payload will be serialized with the built-in serializer for T and encoded with AppConfiguration.ejson.

Return

a set of credentials that can be used to log into an App Services Application using App.login.

Parameters

payload

The payload that will be passed as an argument to the server function.