Skip to content

Commit

Permalink
Change OAuth authorize URL from www.mollie.com to my.mollie.com (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjbender authored Aug 14, 2024
1 parent 0e71f7f commit 112d89a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Mollie.Api/Client/ConnectClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Mollie.Api.Client {
public class ConnectClient : BaseMollieClient, IConnectClient {
private const string AuthorizeEndPoint = "https://www.mollie.com/oauth2/authorize";
private const string AuthorizeEndPoint = "https://my.mollie.com/oauth2/authorize";
private const string TokenEndPoint = "https://api.mollie.nl/oauth2/";

private readonly string _clientId;
Expand Down
4 changes: 2 additions & 2 deletions tests/Mollie.Tests.Integration/Api/ConnectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void GetAuthorizationUrl_WithSingleScope_GeneratesAuthorizationUrl() {
string authorizationUrl = connectClient.GetAuthorizationUrl("abcde", new List<string>() { AppPermissions.PaymentsRead });

// Then:
string expectedUrl = $"https://www.mollie.com/oauth2/authorize?client_id={ClientId}&state=abcde&scope=payments.read&response_type=code&approval_prompt=auto";
string expectedUrl = $"https://my.mollie.com/oauth2/authorize?client_id={ClientId}&state=abcde&scope=payments.read&response_type=code&approval_prompt=auto";
authorizationUrl.Should().Be(expectedUrl);
}

Expand All @@ -36,7 +36,7 @@ public void GetAuthorizationUrl_WithMultipleScopes_GeneratesAuthorizationUrl() {
});

// Then:
string expectedUrl = $"https://www.mollie.com/oauth2/authorize?client_id={ClientId}" +
string expectedUrl = $"https://my.mollie.com/oauth2/authorize?client_id={ClientId}" +
$"&state=abcdef&scope=payments.read+payments.write+profiles.read+profiles.write&response_type=code&approval_prompt=auto";
authorizationUrl.Should().Be(expectedUrl);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Mollie.Tests.Unit/Client/ConnectClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void GetAuthorizationUrl_WithSingleScope_GeneratesAuthorizationUrl()
string authorizationUrl = connectClient.GetAuthorizationUrl("abcde", scopes);

// Assert
string expectedUrl = $"https://www.mollie.com/oauth2/authorize?client_id={ClientId}&state=abcde&scope=payments.read&response_type=code&approval_prompt=auto";
string expectedUrl = $"https://my.mollie.com/oauth2/authorize?client_id={ClientId}&state=abcde&scope=payments.read&response_type=code&approval_prompt=auto";
authorizationUrl.Should().Be(expectedUrl);
}

Expand Down

0 comments on commit 112d89a

Please sign in to comment.