⚡ MultiversX .NET NativeAuth Server SDK: Library for validating native login Token for server app
The content is delivered via nuget packages:
- Validate login token on server side
- NativeAuthClient
- xPortal Hub
*Note: The validation is a bit changed from the original MultiversX NativeAuthServer. In this SDK the ExtraInfo is mandatory and is containing the valid timestamp for the block
var nativeAuthServerConfig = new NativeAuthServerConfig();
nativeAuthServerConfig.AcceptedOrigins = new[] { "https://yourwebsite.com" }; // optional
var nativeAuthServer = new NativeAuthServer(nativeAuthServerConfig);
try
{
var nativeAuthToken = nativeAuthServer.Validate(accessToken);
// token is valid
}
catch (Exception ex) // catching all exceptions
{
// token is not valid
}