mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 04:57:17 +01:00
Add serverUrl to OAuthProviderInfo
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ TGS4 supports OAuth 2.0 with select providers for authentication.
|
||||
|
||||
The flow for this is as follows:
|
||||
|
||||
- Retrieve the @ref api_ver to find out available OAuth providers and their respective client ID and redirect URIs.
|
||||
- Retrieve the @ref api_ver to find out which @ref Tgstation.Server.Api.Models.OAuthProvider are enabled and their respective information.
|
||||
- Send the user to the Authorization Request endpoint for the provider using the client ID from above. See https://tools.ietf.org/html/rfc6749#section-4.1.1. DO NOT specify a redirect URI, this should be configured in the provider.
|
||||
- Retrieve the authorization response code after successfully completing the authorize step above.
|
||||
- Perform the following request:
|
||||
|
||||
@@ -16,5 +16,10 @@ namespace Tgstation.Server.Api.Models
|
||||
/// The redirect URL.
|
||||
/// </summary>
|
||||
public Uri? RedirectUri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The server URL.
|
||||
/// </summary>
|
||||
public Uri? ServerUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,8 @@ namespace Tgstation.Server.Host.Security.OAuth
|
||||
new OAuthProviderInfo
|
||||
{
|
||||
ClientId = OAuthConfiguration.ClientId,
|
||||
RedirectUri = OAuthConfiguration.RedirectUrl
|
||||
RedirectUri = OAuthConfiguration.RedirectUrl,
|
||||
ServerUrl = OAuthConfiguration.ServerUrl
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user