SteamOid2 1.0.1

dotnet add package SteamOid2 --version 1.0.1                
NuGet\Install-Package SteamOid2 -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SteamOid2" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SteamOid2 --version 1.0.1                
#r "nuget: SteamOid2, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SteamOid2 as a Cake Addin
#addin nuget:?package=SteamOid2&version=1.0.1

// Install SteamOid2 as a Cake Tool
#tool nuget:?package=SteamOid2&version=1.0.1                

SteamOid2

<PackageReference Include="SteamOid2" Version="*" />

Library for integrating with Steam's Open-ID provider in .NET or .NET Framework, as described here: https://partner.steamgames.com/doc/features/auth#website.

Available for .NET Framework 4.6.1+, .NET Standard 2.1+, and .NET 5.0+.

The .NET Framework target doesn't have any Microsoft.Extensions support.

Usage

using SteamOid2;
using SteamOid2.API;

// A DI constructor is also available using IConfiguration in the .NET and .NET Standard targets.
ISteamOid2Client client = new SteamOid2Client("http://localhost:8001/", "http://localhost:8001/openid/login");
  • Redirect user to client.GetLoginUri();

  • The user will log in, then a request will be sent to the backend at the callback URI.

  • Use client.ParseIdReponse(uri) to see if the returned Status is successful.

  • Send a POST request to client.GetAuthorizeUri(uri) to ask Steam to confirm that the Steam ID provided was actually logged in to (from the backend).

  • Use client.CheckAuthorizationResponse(response) to check that the response from the POST indicates a valid login session.

If you're seeing Error when you try to log in from Steam, make sure the realm domain name is the same as the callback domain name.

Generating a Strong Name Key/Pair

SteamOid2.dll has a strong name, which means you may want to generate your own to recompile it.

Create a .snk file. This file or its contents should not be shared.

Developer Powershell > cd "Location outside of repository"
Developer Powershell > sn -k SteamOid2.dll.snk
Developer Powershell > sn -p SteamOid2.dll.snk SteamOid2.dll.publickey

Copy the public key to your fork and replace the existing one if you want.

Set the StrongNameKeyPath property in the .csproj file to the path of the .snk file.

Sample implementation with a console application and HttpListener

https://github.com/UncreatedStaff/SteamOid2/blob/master/SteamOid2.Sample/LoginHost.cs

©2024 Valve Corporation. Steam and the Steam logo are trademarks and/or registered trademarks of Valve Corporation in the U.S. and/or other countries.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 139 3/6/2024
1.0.0 153 3/5/2024