diff --git a/Appwrite/Appwrite.csproj b/Appwrite/Appwrite.csproj index 652bb83e..2fde9b18 100644 --- a/Appwrite/Appwrite.csproj +++ b/Appwrite/Appwrite.csproj @@ -2,7 +2,7 @@ netstandard2.0;net462 Appwrite - 8.0.0 + 8.1.0 Appwrite Team Appwrite Team diff --git a/Appwrite/Client.cs b/Appwrite/Client.cs index 96fff456..54713311 100644 --- a/Appwrite/Client.cs +++ b/Appwrite/Client.cs @@ -77,11 +77,11 @@ public Client( _headers = new Dictionary() { { "content-type", "application/json" }, - { "user-agent", $"AppwriteDotNetSDK/8.0.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, + { "user-agent", $"AppwriteDotNetSDK/8.1.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"}, { "x-sdk-name", ".NET" }, { "x-sdk-platform", "server" }, { "x-sdk-language", "dotnet" }, - { "x-sdk-version", "8.0.0"}, + { "x-sdk-version", "8.1.0"}, { "X-Appwrite-Response-Format", "2.0.0" } }; diff --git a/Appwrite/Services/Account.cs b/Appwrite/Services/Account.cs index 22a13925..a4800d1d 100644 --- a/Appwrite/Services/Account.cs +++ b/Appwrite/Services/Account.cs @@ -1930,7 +1930,7 @@ static Models.Token Convert(Dictionary it) /// limits](https://appwrite.io/docs/authentication-security#limits). /// /// - public Task CreateOAuth2Token(Appwrite.Enums.OAuthProvider provider, string? success = null, string? failure = null, List? scopes = null) + public Task CreateOAuth2Token(Appwrite.Enums.OAuthProvider provider, string? success = null, string? failure = null, List? scopes = null, string? state = null) { var apiPath = "/account/tokens/oauth2/{provider}" .Replace("{provider}", provider.Value); @@ -1939,7 +1939,8 @@ public Task CreateOAuth2Token(Appwrite.Enums.OAuthProvider provider, str { { "success", success }, { "failure", failure }, - { "scopes", scopes } + { "scopes", scopes }, + { "state", state } }; var apiHeaders = new Dictionary() diff --git a/CHANGELOG.md b/CHANGELOG.md index 628cf683..72e4ed47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 8.1.0 + +* Added: optional `state` parameter on `createOAuth2Token`, returned unchanged on the success and failure URLs + ## 8.0.0 * Stable release of the dedicated database APIs: `mysql`, `postgresql`, `mongo`, `documentsDB`, and `vectorsDB` services, previously released as release candidates diff --git a/README.md b/README.md index b7581ff7..2680a78e 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,17 @@ Appwrite is an open-source backend as a service server that abstracts and simpli Add this reference to your project's `.csproj` file: ```xml - + ``` You can install packages from the command line: ```powershell # Package Manager -Install-Package Appwrite -Version 8.0.0 +Install-Package Appwrite -Version 8.1.0 # or .NET CLI -dotnet add package Appwrite --version 8.0.0 +dotnet add package Appwrite --version 8.1.0 ``` diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md index f47f7e5e..8cc40785 100644 --- a/docs/examples/account/create-o-auth-2-token.md +++ b/docs/examples/account/create-o-auth-2-token.md @@ -15,7 +15,8 @@ await account.CreateOAuth2Token( provider: OAuthProvider.Amazon, success: "https://example.com", // optional failure: "https://example.com", // optional - scopes: new List() // optional + scopes: new List(), // optional + state: "" // optional ); ```