mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-27 07:20:26 +01:00
[#3617] added expiry field to the OAuth2 user
This commit is contained in:
1 parent
3b79535dc7
commit
99bdb4e701
23 files changed
+70
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/types"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/microsoft"
|
||||
)
|
||||
@@ -63,5 +64,7 @@ func (p *Microsoft) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
|
||||
RefreshToken: token.RefreshToken,
|
||||
}
|
||||
|
||||
user.Expiry, _ = types.ParseDateTime(token.Expiry)
|
||||
|
||||
return user, nil
|
||||
}
|
||||
Reference in new issue
Block a user