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
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,18 +76,22 @@ session = Session.Builder() \
76
76
.create()
77
77
```
78
78
79
-
#### With auth url callback
79
+
#### With auth url callback and changing the content of the success page
80
80
81
81
```python
82
82
from librespot.core import Session
83
+
import webbrowser
83
84
84
85
# This will pass the auth url to the method
85
86
86
87
defauth_url_callback(url):
87
-
print(url)
88
+
webbrowser.open(url)
89
+
90
+
# This is the response sent to the browser once the flow has been completed successfully
91
+
success_page ="<html><body><h1>Login Successful</h1><p>You can close this window now.</p><script>setTimeout(() => {window.close()}, 100);</script></body></html>"
0 commit comments