supertokens / supertokens-golang

GoLang SDK for SuperTokens
https://supertokens.com
Other
115 stars 34 forks source link

API not compliant to swagger #377

Closed trivialkettle closed 11 months ago

trivialkettle commented 11 months ago

Hi, I am using supertokens core 7 and go lib github.com/supertokens/supertokens-golang v0.16.0.

The signin response contains a "user" field that is not compliant to API 1.17 nor 1.18. While the changelog for version 0.13.0 shows support for FDI 1.17.

The SignIn Response I get:

{"status":"OK","user":{"id":"d5108275-da8a-4d0e-aed1-60049d33327b","email":"e@ma.il","timejoined":1696408978513,"tenantIds":["public"]}}

In API v1.17 the field "tenantIds" is not in the schema, but v1.18 uses "emails: []" not "email".

trivialkettle commented 11 months ago

And there is also a mismatch between "timejoined" (lowercase j) in the struct and "timeJoined" (uppercase J) in the API (1.17 and 1.18).

rishabhpoddar commented 11 months ago

Thanks @trivialkettle . We have updated the swagger spec for FDI version 1.17 to have the tenantIds array in the user object (that was missing from the API spec).

We are working on fixing the timejoined casing issue.

rishabhpoddar commented 11 months ago

This has been fixed in golang SDK version >= 0.16.1

trivialkettle commented 11 months ago

Thanks