Skip to content

Commit

Permalink
Change redirect uri method to be sync
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-vakil committed Jul 18, 2024
1 parent d397918 commit 0a3719d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Opserver.Web/Controllers/AuthController.OIDC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ partial class AuthController
private const string OidcIdentifierKey = "id";
private const string OidcReturnUrlKey = "returnUrl";

private async Task<string> GetRedirectUri()
private string GetRedirectUri()
{
var oidcSettings = (OIDCSecuritySettings) Current.Security.Settings;
var scheme = "https"; //(oidcSettings.UseHttpsForRedirects ? "https" : Request.Scheme);
Expand Down Expand Up @@ -90,7 +90,7 @@ public async Task<IActionResult> OAuthCallback(string code, string state, string
// hooray! we're all set, let's go fetch our access token
var oidcSettings = (OIDCSecuritySettings) Current.Security.Settings;
var scopes = oidcSettings.Scopes ?? OIDCSecuritySettings.DefaultScopes;
var redirectUri = await GetRedirectUri();
var redirectUri = GetRedirectUri();

var form = new NameValueCollection
{
Expand Down Expand Up @@ -226,7 +226,7 @@ private IActionResult RedirectToProvider(string returnUrl)

var oidcSettings = (OIDCSecuritySettings) Current.Security.Settings;
var scheme = "https"; //(oidcSettings.UseHttpsForRedirects ? "https" : Request.Scheme);

Check failure on line 228 in src/Opserver.Web/Controllers/AuthController.OIDC.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'scheme' is assigned but its value is never used

Check failure on line 228 in src/Opserver.Web/Controllers/AuthController.OIDC.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'scheme' is assigned but its value is never used
var redirectUri = await GetRedirectUri();
var redirectUri = GetRedirectUri();

// construct the URL to the authorization endpoint
var authorizationUrl = new UriBuilder(oidcSettings.AuthorizationUrl);
Expand Down

0 comments on commit 0a3719d

Please sign in to comment.