Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken basic auth in generated Go SDK #6510

Open
earwin opened this issue Mar 22, 2025 · 0 comments
Open

Broken basic auth in generated Go SDK #6510

earwin opened this issue Mar 22, 2025 · 0 comments
Assignees
Labels
language/go product/sdk-generator Fern's SDK Generator that outputs client libraries in 7 languages

Comments

@earwin
Copy link

earwin commented Mar 22, 2025

Which Fern component?

SDK Generator

How urgent is this?

P1 - High (Strongly needed)

What's the issue?

Expectation: https://datatracker.ietf.org/doc/html/rfc7617#section-2

To receive authorization, the client
...
2.  constructs the user-pass by concatenating the user-id, a single colon (":") character, and the password,

Reality

f.P(`header.Set("Authorization", `, `"Basic " + base64.StdEncoding.EncodeToString([]byte(r.`, username, ` + ": " + r.`, password, `)))`)

There's an extra space after the colon, which breaks auth.

Fern CLI & Generator Versions

Fern: 0.56.28
fernapi/fern-go-sdk 0.37.2

Workaround

You can patch the generated code

Are you interested in contributing a fix?

No

@dannysheridan dannysheridan added language/go product/sdk-generator Fern's SDK Generator that outputs client libraries in 7 languages labels Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/go product/sdk-generator Fern's SDK Generator that outputs client libraries in 7 languages
Development

No branches or pull requests

3 participants