golang / oauth2

Go OAuth2
https://golang.org/x/oauth2
BSD 3-Clause "New" or "Revised" License
5.34k stars 984 forks source link

Marshalling Token produces incompatible token #670

Open gudvinr opened 1 year ago

gudvinr commented 1 year ago

When you marshal oauth2.Token e.g. to JSON, resulting token can't be used in the same way anymore.

Fields embedded in raw field aren't going into JSON, thus when you unmarshal token back to oauth2.Token, you can't use Extra method to extract fields.

andig commented 1 year ago

Seems this is by design.

0xGar commented 11 months ago

Seems this is by design.

Could you elaborate please?