File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Thirdweb/Thirdweb.Wallets/InAppWallet Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,14 @@ public class InAppWalletBrowser : IThirdwebBrowser
10
10
private TaskCompletionSource < BrowserResult > _taskCompletionSource ;
11
11
private static readonly HttpListener _httpListener = new ( ) ;
12
12
13
+ private readonly string _redirectHtmlOverride ;
14
+
15
+ public InAppWalletBrowser ( string redirectHtmlOverride = null )
16
+ {
17
+ _httpListener . Prefixes . Add ( "http://localhost:8080/" ) ;
18
+ this . _redirectHtmlOverride = redirectHtmlOverride ;
19
+ }
20
+
13
21
/// <summary>
14
22
/// Initiates a login process using the in-app browser.
15
23
/// </summary>
@@ -86,7 +94,7 @@ private void IncomingHttpRequest(IAsyncResult result)
86
94
var httpContext = httpListener . EndGetContext ( result ) ;
87
95
var httpRequest = httpContext . Request ;
88
96
var httpResponse = httpContext . Response ;
89
- var buffer = System . Text . Encoding . UTF8 . GetBytes ( Constants . REDIRECT_HTML ) ;
97
+ var buffer = System . Text . Encoding . UTF8 . GetBytes ( this . _redirectHtmlOverride ?? Constants . REDIRECT_HTML ) ;
90
98
91
99
httpResponse . ContentLength64 = buffer . Length ;
92
100
var output = httpResponse . OutputStream ;
You can’t perform that action at this time.
0 commit comments