After deploying my mean app to heroku, everything works fine, page is displayed as it should, but when i tried to login as user and checked chrome network tab i realised that the request url is to Request URL: http://localhost:4444/graphql.
please all help / advice will save my day.
Did you write the url request in your code ? If you tried to request the application you deploy on Heroku you should use environnement variable to set the url.
Related
Fail to load resource: server 503(service unavailable)
First thing, I am not sure whether I had set up the port correctly. My React frontend is running on localhost:3000 while my Express backend is running on localhost:3001
This is my .env file.
enter image description here
This is my server.js.
enter image description here
On the frontend side, whenever doing a HTTP request, I use Axios, the endpoint url is "http://localhost:3001/app/Member", something like that. I already had a MongoDB Atlas connected with the app, it is working perfectly on localhost:3001, but I have problem trying to deploy it to Heroku. Some people said there is connection problem between MongoDB Atlas and Heroku, they suggest using the MongoDB sandbox in Heroku to solve this problem, but I already have the database with all the data that I want to used with the app, is there any way that I can import the data from my database to the MongoDB sandbox?
I tried to use "heroku local" to test whether is working, the app is running on localhost:5000, I can see my signup and login page, but I am not able to signup or login with a user email and password like I did perfectly on development mode localhost:3000.
I deployed it to heroku live, it gave me a server 503 error(service unavailable). I logged out the error.enter image description here
I have developed a front (react) and a back (php laravel) with the authentication system "sanctum". All is working fine on localhost. But I can't get it to work in production in heroku.
In local environment ,my .env is (extract) :
SESSION_DRIVER=cookie
SANCTUM_STATEFUL_DOMAINS=localhost:3000,127.0.0.1:3000,localhost:8000,127.0.0.1:8000
SESSION_DOMAIN=localhost
If I have understood well, the front and back must be on the same domains for the cookies. As my back and front are hosted in heroku (herokuapp.com), I have these .env :
But with this configuration, I always have a response 419 CSRF token mismatch.
Certainly my conf is not correct. But I tried a lot of things without success.
edit :
The back url is: https://school-back-v2.herokuapp.com/
The front url is: https://react-protected-routes.herokuapp.com/
Heroku is blacklisted by browsers to use cookie if you site placed on Heroku subdomain. You can use Heroku, but must to register your own domain and use it, so that resolve this problem.
Other variant - use tokens instead cookie.
I would like to test some real data with plaid and that's why i am using development environment now instead of sandbox. And I am confused what redirect uri should i use.
This is the error on my localhost:3000.
Unable to fetch link_token: please make sure your backend server is running and that your .env file has been configured correctly.
Error Code: INVALID_FIELD
Error Type: INVALID_REQUEST
Error Message: redirect_uri must use HTTPS
I understand that for development envrionment we should use https instead of http, but I wonder what uri should i redirect to if i am only testing the API?
Thank you
If you don't particularly care about using the Quickstart with OAuth redirect flows, and just want to use live data from Development, you should just be able to leave that field blank.
I have a question regarding Providers.
I'm using Strapi in the docker with Nginx reverse proxy and I set up google provider and service.js I added URL: env("", "https://my-link.com/api"),
in the beginning, everything was working fine till I clear the browser cache. Now I'm getting an error
Grant Missing session or misconfigured provider
so when I call /connect/google/callback its fail with 302
On the Strapi website, I found this but not much clear how to debug the issue
Grant: missing session or misconfigured provider: It may be due to many things.
The redirect URL can't be built: Make sure you have set the backend URL in config/server.js: Setting up the server URL
A session/cookie/cache problem: You can try again in a private tab.
The incorrect use of a domain with ngrok: Check your urls and make sure that you use the ngrok URL instead of http://localhost:1337. Don't forget to check the backend url set in the example app at src/config.js.
Thanks in advance.
I know this question has asked before many times. I've tried every one but no luck,
I my situation,
Website url: https://mywebsite.com/qa
redirect url: https://mywebsite.com/qa/login/facebook/callback
I have added my domain to app domain, redirect url to valid oAuth redirect url. But same error.
I even created a new app.
However facebook authentication is working fine with https://mywebsite.com/ domain. It's is a different app and a website.
The issue happens only with the site in the sub folder.
Any help ?
Thank you.
EDIT
Screenshot
Can you check if "Valid OAuth Redirect URIs" in Facebook app "Facebook login" setting is properly defined like shown in screenshot attached ?
Also have you checked if your app has strict mode enabled ?
This error occurs if your OAuth setting is not correct.
I would suggest to check all settings of your app thoroughly.