Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ keywords:
- openid connect
- machine to machine
- kinde client
updated: 2024-01-15
updated: 2026-04-13
featured: false
deprecated: false
ai_summary: Guide to using the Kinde .NET SDK for integrating with the Management API, including installation, configuration, and API calls for user and organization management.
Expand Down Expand Up @@ -117,4 +117,30 @@ Note this requires the `create:organizations` and `update:organizations` scopes

For full details of the available management API functions, see the [Kinde Management API specification](/kinde-apis/management/).

## Revoke a token

To revoke an access or refresh token, call the `/oauth2/revoke` endpoint with your client credentials and the token to revoke.

```csharp
using System.Net.Http.Headers;
using System.Text;

var httpClient = new HttpClient();
var credentials = Convert.ToBase64String(
Encoding.UTF8.GetBytes($"{clientId}:{clientSecret}")
);

var request = new HttpRequestMessage(HttpMethod.Post, "https://your-subdomain.kinde.com/oauth2/revoke");
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", credentials);
request.Content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("token", tokenToRevoke),
new KeyValuePair<string, string>("token_type_hint", "access_token") // or "refresh_token"
});

var response = await httpClient.SendAsync(request);
```

A successful revocation returns `HTTP 200`. Once revoked, the token can no longer be used to authenticate requests.

If you need help getting Kinde connected, contact us at [support@kinde.com](mailto:support@kinde.com).
17 changes: 16 additions & 1 deletion src/content/docs/developer-tools/sdks/backend/php-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: PHP SDK
description: "Complete guide for PHP SDK including Composer installation, OAuth integration, authentication flow, user permissions, and cookie configuration for PHP applications."
sidebar:
order: 14
tableOfContents:
maxHeadingLevel: 3
relatedArticles:
- 02d02820-92da-4721-9a91-222c9b095869
head:
Expand Down Expand Up @@ -33,7 +35,7 @@ keywords:
- user permissions
- cookie settings
- callback URLs
updated: 2024-01-15
updated: 2026-04-13
featured: false
deprecated: false
ai_summary: Complete guide for PHP SDK including Composer installation, OAuth integration, authentication flow, user permissions, and cookie configuration for PHP applications.
Expand Down Expand Up @@ -181,6 +183,19 @@ $storage->setCookiePath('/');
$storage->setCookieDomain('yourdomain.com');
```

### Disabling the Secure cookie flag (for local development)

By default, cookies are set with the `Secure` flag, which requires HTTPS. When developing over HTTP locally, you can disable this:

```php
$storage = Storage::getInstance();
$storage->setCookieSecure(false); // Only use this in local/dev environments

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function doesn't exist in the sdk yet.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Any workarounds? or should we drop it? Do suggest.

```

<Aside type="warning">
Do not disable the `Secure` flag in production.
</Aside>

## Logout

The Kinde SPA client comes with a logout method.
Expand Down
Loading