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

Runway deployment broken? #20

Closed
jeffchuber opened this issue Oct 21, 2022 · 6 comments
Closed

Runway deployment broken? #20

jeffchuber opened this issue Oct 21, 2022 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jeffchuber
Copy link

Screen Shot 2022-10-21 at 4 39 55 PM

I deployed the app to runway but Linear is telling me the URL for hooking it up is invalid.

Here is an API key sanitized version

https://linear.app/oauth/authorize?client_id=1234&redirect_uri=https://app-production-111.up.railway.app&scope=write&state=linear-asdf&response_type=code&prompt=consent

I played around with the uri.. adding /? between the domain and the url params. As well as doing encodeURIComponent on the url, but I got the same thing from Linear.

This could be a Linear bug! Unsure.

Anyone else seeing this?

@tedspare tedspare self-assigned this Oct 22, 2022
@tedspare tedspare added the documentation Improvements or additions to documentation label Oct 22, 2022
@tedspare
Copy link
Collaborator

Not your fault, @jeffchuber! This is a known issue that took a backseat. Thanks for bringing it up.

To self-host, you can either

  1. manually generate API keys and populate the LINEAR_API_KEY and GITHUB_API_KEY env vars (solo use only) or
  2. create your own OAuth apps under Linear > Settings > API > Create new application (with your Railway URL as the callback URL) and GitHub > your org > Settings > Developer > OAuth apps > New. Once created, you'll replace the OAUTH_ID fields in constants.

Option 2 will allow you to add teammates later.

This limitation follows from Linear and GH OAuth disallowing wildcard callback URLs.

I'll correct this in the self-hosting docs!

@jeffchuber
Copy link
Author

@tedspare thanks for the quick response :)

Option 2 sounds great - your instructions are really good. One followup question - where can I find my "Railway URL" - is that just the base URL? eg https://syncymcsyncface.up.railway.app/?

Is that URL also inputted into Github's Authorization callback URL?

I am sure this is obvious to some. Appreciate the help!

@tedspare
Copy link
Collaborator

tedspare commented Oct 24, 2022

@jeffchuber great to hear! Thanks for catching a few unclear points (not obvious!).

The callback URL should actually be https://projectname.up.railway.app/api (key addition: /api). I'll clarify this in the docs.

And yep, GitHub OAuth takes that same callback URL.

😂 syncyMcsyncface

@jeffchuber
Copy link
Author

Perfect, that fixed things up perfectly.

Thanks for the help!

@jeffchuber
Copy link
Author

In the end I was unable to get this to work sadly. Whenever I connected with Github it would reroute me back to synclinear.com/***** instead of my app, I don't know why. Whenever I connected with Linear, it would say that my uri was invalid. Very strange. It's almost like it wasn't even deploying my code... but I did do a smoke test and change some copy on the home page to verify and it did show my updated copy. The project had no string "synclinear" that wasn't in docs or marketing copy. Very very odd - but ran out of time this time to make it work.

@tedspare
Copy link
Collaborator

The smoke test helps to zero in on the problem. I wonder if you updated both OAUTH_IDs in constants.ts? Stale OAUTH_IDs could be the last piece pointing to synclinear.com/*. Otherwise, thanks for giving it a try @jeffchuber!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants