Reducing OAuth onboarding friction: email sign-in, referrals, and terms of service blocks
baseloop
PROOP

a month ago

Hi, we are working to minimize onboarding friction for our less technical users. Our goal is to make self-hosting easy so users maintain privacy while still receiving our support, which is why we direct them to set things up with Railway.

Right now our users log in to our app via our OAuth and then to host the app they need to follow two "simple" steps:

  1. They must connect to Railway to grant our application access.
  2. They need to spin up our template.

We've reduced most of the friction with the second step, but we're struggling a bit with the first.

Here are the points of friction in order:

  1. Many of the users don't have GitHub and they are presented with login with GitHub and then the email in small letters below, so users tend to miss the fine print.
  2. For some reason, our referral link doesn't get attached as part of the connection step, but we might be doing something wrong here.
  3. Since connecting our app to their Railway account is a two-step process consisting of creating an account and connecting with our app, there is an intermediate step requiring them to accept Railway ToCs, causing the whole process to fail somewhere in the middle with a confusing message.

For context on point 2, here is how we currently generate and pass parameters to the OAuth URL:

params = {
    "response_type": "code",
    "client_id": RAILWAY_CLIENT_ID,
    "redirect_uri": redirect_uri,
    "scope": RAILWAY_OAUTH_SCOPES,
    "state": state,
    "code_challenge": challenge,
    "code_challenge_method": "S256",
}
if "offline_access" in RAILWAY_OAUTH_SCOPES.split():
    params["prompt"] = "consent"
if RAILWAY_REFERRAL_CODE:
    params["referralCode"] = RAILWAY_REFERRAL_CODE

auth_url = RAILWAY_AUTH_URL + "?" + urllib.parse.urlencode(params)

So in line with this:

  1. Could we make the OAuth from the connection step default to email sign-in instead of GitHub sign-in?
  2. Is there a way to successfully attach our referral to the account creation via the URL parameters we are passing?
  3. Is there something we could do so that accepting ToCs comes in between creating an account and connecting to our app, instead of requiring users to leave the connection step, go into Railway, accept ToCs, and then come back and continue?

Thank you!

Solved

4 Replies

Railway
BOT

a month ago

The documented OAuth authorization parameters are response_type, client_id, redirect_uri, scope, state, code_challenge, code_challenge_method, and prompt. There is no supported parameter to default the login screen to email instead of GitHub, and referralCode is not a documented parameter on the authorization endpoint, which is likely why it is not being attached. The ToS acceptance flow during account creation is also not configurable from the OAuth redirect. These would all be feature requests, and you can submit them at railway.com/feedback.


Status changed to Awaiting User Response Railway about 1 month ago


Railway

The documented [OAuth authorization parameters](https://docs.railway.com/integrations/oauth/login-and-tokens) are `response_type`, `client_id`, `redirect_uri`, `scope`, `state`, `code_challenge`, `code_challenge_method`, and `prompt`. There is no supported parameter to default the login screen to email instead of GitHub, and `referralCode` is not a documented parameter on the authorization endpoint, which is likely why it is not being attached. The ToS acceptance flow during account creation is also not configurable from the OAuth redirect. These would all be feature requests, and you can submit them at [railway.com/feedback](https://railway.com/feedback).

baseloop
PROOP

a month ago

Sounds good. I was hoping for undocumented features or perhaps some work in progress. referralCode not being attachable as part of OAuth seems like a bug.


Status changed to Awaiting Railway Response Railway about 1 month ago


Railway
BOT

a month ago

We don't have any undocumented parameters or in-progress work to share here. referralCode isn't a supported parameter on the OAuth authorization endpoint, so it's being silently ignored rather than failing - submitting this at railway.com/feedback is the best way to get it on the roadmap alongside the email-default and ToS flow improvements.


Status changed to Awaiting User Response Railway about 1 month ago


Status changed to Solved baseloop about 1 month ago


Railway

We don't have any undocumented parameters or in-progress work to share here. `referralCode` isn't a supported parameter on the OAuth authorization endpoint, so it's being silently ignored rather than failing - submitting this at [railway.com/feedback](https://railway.com/feedback) is the best way to get it on the roadmap alongside the email-default and ToS flow improvements.

baseloop
PROOP

a month ago

Sounds good - I reported feedback here so resolving this. Thanks.


Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Solved Railway about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...