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

Add Ability to use base URL via PUBLIC_URL environment variable #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

theminor
Copy link

@theminor theminor commented Jun 26, 2019

Per discussion on gitter - the simplest solution was simply adding a reference to the PUBLIC_URL environment variable in the Router object. Also added basic instructions to deploy if anyone wants to do so. My understanding is that this shouldn't affect non-production environments..

@DanielDe
Copy link
Owner

Awesome, thanks @theminor! Do you know if PUBLIC_URL has a default value? I'm interested in what happens with <Router basename={${process.env.PUBLIC_URL}}> if PUBLIC_URL isn't set.

@theminor
Copy link
Author

@DanielDe from what I've read, <Router basename=...> will have no effect if PUBLIC_URL is null. It will also only apply for production builds - that is, you have to compile i.e. with serve -s build or similar - and then serve the compiled version.

All that said, I'm having problems getting the Google Authentication working. I have the API all set up and it seems to authenticate (asks for permissions, etc.), but there must be an issue with the redirect after authentication. I have the redirect pointing to https://mydomain.com/org-web but when the redirect back to mydomain happens, I get errors.

I haven't tried dropbox yet, but it might have the same issue. I'm still trying to find where the problem is...

@DanielDe
Copy link
Owner

DanielDe commented Jul 5, 2019

Ah, hey, sorry for the slow reply here @theminor.

What error are you getting with GDrive? If you haven't done so already, you'll need to specify the redirect URIs in the Google Cloud console.

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

Successfully merging this pull request may close these issues.

2 participants