Comments (4)
Hey @alex-restless, we have a fix up for this at #174. I think we might (tentatively) cut a release next week as we'd like to also include some other changes alongside it
from go-auth0.
This issue still persists today, just got bit by it again as I was creating a new tenant and forgot that I originally hit this months ago.
The extra frustrating thing is that if you add a fake value here, and then remove it - the allowed_audiences
appears to correctly come through as an empty list. I'm going to keep a fake-value
listed in there for now as I know that works, and don't want it to magically rollback to being an empty string and start failing again.
An extra frustrating thing is in the Go SDK it doesn't tell you which field it is that is having troubles.
I had to bypass the SDK and make an HTTP request directly to the endpoint, but then try to marshal the same type. Then I was able to actually view the real issue.
Example:
url := fmt.Sprintf("%s/api/v2/connections", c.domain)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
req.Header.Add("authorization", fmt.Sprintf("Bearer %s", accessToken))
res, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
return nil, err
}
var connectionList []*management.Connection
err = json.Unmarshal(body, &connectionList)
if err != nil {
panic(err)
}
return connectionList, nil
Prints the real error:
panic: json: cannot unmarshal string into Go struct field ConnectionOptionsGoogleOAuth2.allowed_audiences of type []string
Where as the SDK prints out a pretty cryptic:
failed to unmarshal response payload: json: cannot unmarshal string into Go struct field ConnectionList.connections of type []string
I'm guessing because it uses a wrapper ConnectionList
type to get the pagination data.
from go-auth0.
This hit me again today, any chance of a bump? Appreciate there's a workaround so low priority.
The workaround for me was hinted in the linked issue - I went to the connection, edited the Allowed Mobile Client IDs
with a value, then cleared it and hey-presto it works.
from go-auth0.
Thank you for fixing this! Upgraded from 0.37.1 to 0.45. Worked like a charm! 🚀
from go-auth0.
Related Issues (20)
- Cannot remove the User Picture HOT 2
- Support returning member roles in `OrganizationManager.Members()`
- LogWrapper fails to unmarshal log user_id field HOT 6
- docs do not explain how to paginate HOT 3
- make authenticationError an exported type HOT 2
- Support MFA APIs HOT 2
- failed to unmarshal response payload: invalid character 'W' looking for beginning of value HOT 3
- Auth client fails to unmarshal signup failure error HOT 2
- Management User object does not support multifactor_last_modified tag HOT 1
- Error parsing does not support `mfa_token` field when the error is a 403 `mfa_required` error
- ExtraParameters field passed with LoginWithClientCredentialsRequest not used HOT 1
- Pointers to Organization Metadata HOT 2
- Body being sent in get requests HOT 1
- Support enabled_connections field in the CreateOrganization call HOT 2
- Connections with Wordpress strategy cannot be successfully unmarshaled due to improper expectations HOT 4
- Support Backchannel logout parameters HOT 2
- Missing delete refresh tokens from a user HOT 1
- Support for MFA Management API
- ChangePassword method on SDK does not return the ticket HOT 2
- Json Marshalling a ConnectionOptionsOIDC is causing failures when creating a new connection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-auth0.