You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Library rejects authentication tokens with additional newlines or whitespace before / after the token (e.g. <authtoken>\n):
ERRO[0000] failedtoreconnectsessionerr="authentication failed: The authtoken you specified does not look like a proper ngrok tunnel authtoken.\nYourauthtoken: <authtoken>\n\nInstructionstoinstallyourauthtokenareonyourngrokdashboard:\nhttps://dashboard.ngrok.com/get-started/your-authtoken\r\n\r\nERR_NGROK_105\r\n"id=974c591a9879obj=csess
Expectation:
User sets authentication token with whitespace / newlines (e.g. <authtoken>\n)
Library trims authentication token for whitespace / newlines (becomes <authtoken>)
Library works as expected
The text was updated successfully, but these errors were encountered:
This feels like it should be the caller's responsibility, not the library's.
If we had something like WithAuthTokenFromFile("/some/path"), chomping newlines off that would make sense, but the methods we provide are WithAuthtoken(string) and WithAuthtokenFromEnv().
For WithAuthtokenFromEnv(), trimming makes some sense to me. For WithAuthtoken(string), it really feels like it should be the caller's responsibility to do WithAuthtoken(strings.TrimSpace(authToken)) if they've gotten it from a source where it might have whitespace (such as from reading a file).
Are you expecting to just trim the environment variable one (which makes sense to me!), or are you suggesting trimming for both methods?
What's happening:
Library rejects authentication tokens with additional newlines or whitespace before / after the token (e.g.
<authtoken>\n
):Expectation:
<authtoken>\n
)<authtoken>
)The text was updated successfully, but these errors were encountered: