MCPcopy
hub / github.com/pocketbase/pocketbase / FetchRawUserInfo

Method FetchRawUserInfo

tools/auth/twitch.go:93–102  ·  view source on GitHub ↗

FetchRawUserInfo implements Provider.FetchRawUserInfo interface method. This differ from BaseProvider because Twitch requires the Client-Id header.

(token *oauth2.Token)

Source from the content-addressed store, hash-verified

91//
92// This differ from BaseProvider because Twitch requires the Client-Id header.
93func (p *Twitch) FetchRawUserInfo(token *oauth2.Token) ([]byte, error) {
94 req, err := http.NewRequestWithContext(p.ctx, "GET", p.userInfoURL, nil)
95 if err != nil {
96 return nil, err
97 }
98
99 req.Header.Set("Client-Id", p.clientId)
100
101 return p.sendRawUserInfoRequest(req, token)
102}

Callers 1

FetchAuthUserMethod · 0.95

Calls 2

SetMethod · 0.65

Tested by

no test coverage detected