You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(#479): Send returnUrl to BankID as part of the auth/sign/payment requests
* feat(#479): Send returnUrl to BankID as part of the auth/sign/payment requests
* Use existing logic in active login to provide the correct return url depending on device, os, etc. This logic is currently used when setting the return url as part of the auto launch url and should be applied when sending the return url to bankid as part of the auth, sign or payment request as well.
---------
Co-authored-by: Elin Fokine <ElinO@activesolution.se>
@@ -27,21 +27,26 @@ public static class BankIdAppApiClientExtensions
27
27
/// <param name="userVisibleDataFormat">
28
28
/// If present, and set to "simpleMarkdownV1", this parameter indicates that userVisibleData holds formatting characters which, if used correctly, will make the text displayed with the user nicer to look at.
29
29
/// For further information of formatting options, please study the document Guidelines for Formatted Text.
30
+
/// </param>
31
+
/// <param name="returnUrl">
32
+
/// If present the user will be redirected to this URL when the order is completed. Any return URL provided in the start URL when the BankID app was launched will be ignored.
30
33
/// </param>
31
34
publicstaticTask<AuthResponse>AuthAsync(
32
35
thisIBankIdAppApiClientappApiClient,
33
36
stringendUserIp,
34
37
Requirement?requirement=null,
35
38
string?userVisibleData=null,
36
39
byte[]?userNonVisibleData=null,
37
-
string?userVisibleDataFormat=null)
40
+
string?userVisibleDataFormat=null,
41
+
string?returnUrl=null)
38
42
{
39
43
returnappApiClient.AuthAsync(new(
40
44
endUserIp,
41
45
userVisibleData:userVisibleData,
42
46
userNonVisibleData:userNonVisibleData,
43
47
requirement:requirement,
44
-
userVisibleDataFormat:userVisibleDataFormat));
48
+
userVisibleDataFormat:userVisibleDataFormat,
49
+
returnUrl:returnUrl));
45
50
}
46
51
47
52
/// <summary>
@@ -81,8 +86,8 @@ public static Task<AuthResponse> AuthAsync(this IBankIdAppApiClient appApiClient
/// Initiates an authentication order. Use the collect method to query the status of the order.
88
93
/// </summary>
@@ -100,14 +105,18 @@ public static Task<SignResponse> SignAsync(this IBankIdAppApiClient appApiClient
100
105
/// </param>
101
106
/// <param name="userNonVisibleData">
102
107
/// Data not displayed to the user.
108
+
/// </param>
109
+
/// <param name="returnUrl">
110
+
/// If present the user will be redirected to this URL when the order is completed. Any return URL provided in the start URL when the BankID app was launched will be ignored.
103
111
/// </param>
104
112
/// <returns>If the request is successful, the OrderRef and AutoStartToken is returned.</returns>
/// Orders started on the same device (started with autostart token) will call this URL when the order is completed, ignoring any return URL provided in the start URL when the BankID app was launched.
192
+
/// Orders started on the same device (started with autostart token) will call this URL when the order is completed,
193
+
/// ignoring any return URL provided in the start URL when the BankID app was launched.
194
+
///
195
+
/// If the user has a version of the BankID app that does not support getting the returnUrl from the server,
196
+
/// the order will be cancelled and the user will be asked to update their app.
197
+
///
198
+
/// The return URL you provide should include a nonce to the session.
199
+
/// When the user returns to your app or web page, your service should verify that
200
+
/// the device receiving the returnUrl is the same device that started the order.
0 commit comments