We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec8d83a commit 2c87fa6Copy full SHA for 2c87fa6
client/android/login.go
@@ -33,6 +33,7 @@ type ErrListener interface {
33
// the backend want to show an url for the user
34
type URLOpener interface {
35
Open(string)
36
+ OnLoginSuccess()
37
}
38
39
// Auth can register or login new client
@@ -181,6 +182,11 @@ func (a *Auth) login(urlOpener URLOpener) error {
181
182
183
err = a.withBackOff(a.ctx, func() error {
184
err := internal.Login(a.ctx, a.config, "", jwtToken)
185
+
186
+ if err == nil {
187
+ go urlOpener.OnLoginSuccess()
188
+ }
189
190
if s, ok := gstatus.FromError(err); ok && (s.Code() == codes.InvalidArgument || s.Code() == codes.PermissionDenied) {
191
return nil
192
0 commit comments