Open AkkermanD opened 1 week ago
Hello! I'm facing an issue while trying to authorize against the snac2 mastodon api. The fetch_access_token returns an error: missing field scope at line 5 column 1
missing field scope at line 5 column 1
Snac supports subset of the mastodon's API, but it does not return the scope field, if there were no such field in the request: https://codeberg.org/grunfink/snac2/src/commit/2769e6b1d76b1043f8d8cdb928a95ade48b8ebff/mastoapi.c#L404
scope
Megalodon does not send the scope field: https://docs.rs/megalodon/latest/src/megalodon/mastodon/mastodon.rs.html#135
But it looks like it is Ok for oauth server to not return scope in the response, if it is identical to the scope requested by the client: https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
scope OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
I'm not sure if it worth to add new SNS for the snac to fix this. Can we make scope field optional in the TokenDataFromServer struct?
TokenDataFromServer
There is no problem changing scope to an optional field, but it's better to add snac2 as a new SNS.
snac2
Hello! I'm facing an issue while trying to authorize against the snac2 mastodon api. The fetch_access_token returns an error:
missing field scope at line 5 column 1
Snac supports subset of the mastodon's API, but it does not return the
scope
field, if there were no such field in the request: https://codeberg.org/grunfink/snac2/src/commit/2769e6b1d76b1043f8d8cdb928a95ade48b8ebff/mastoapi.c#L404Megalodon does not send the
scope
field: https://docs.rs/megalodon/latest/src/megalodon/mastodon/mastodon.rs.html#135But it looks like it is Ok for oauth server to not return
scope
in the response, if it is identical to the scope requested by the client: https://datatracker.ietf.org/doc/html/rfc6749#section-5.1I'm not sure if it worth to add new SNS for the snac to fix this. Can we make
scope
field optional in theTokenDataFromServer
struct?