summaryrefslogtreecommitdiffstats
path: root/src/server/Api/Internal/OAuthCallbackRoute.cs
blob: 156ff117b40df6f249d0fdf0e8332679a0162ebe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
namespace IOL.BookmarkThing.Server.Api.Internal;

public class OAuthCallbackRoute : RouteBaseInternalSync.WithoutRequest.WithActionResult
{
	private readonly IConfiguration _configuration;

	public OAuthCallbackRoute(IConfiguration configuration) {
		_configuration = configuration;
	}

	[AllowAnonymous]
	[ApiVersionNeutral]
	[ApiExplorerSettings(IgnoreApi = true)]
	[HttpGet("~/oauth-cb")]
	public override ActionResult Handle() {
		return Redirect(_configuration.GetValue<string>("FRONTEND_CANONICAL_URL"));
	}
}