Skip to content

Commit

Permalink
Merge pull request tinode#578 from tinode/topic-proxy
Browse files Browse the repository at this point in the history
Fix for issue 577
  • Loading branch information
or-else authored Dec 3, 2020
2 parents 57753af + 1cfc0d6 commit 60d82b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/auth/rest/auth_rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ func (a *authenticator) Authenticate(secret []byte) (*auth.Rec, []byte, error) {
return nil, nil, err
}

// Auth record not found.
if resp.Record == nil {
return nil, nil, types.ErrFailed
}

// Check if server provided a user ID. If not, create a new account in the local database.
if resp.Record.Uid.IsZero() && a.allowNewAccounts {
if resp.NewAcc == nil {
Expand Down

0 comments on commit 60d82b5

Please sign in to comment.