Authentication issue DRF, Firebase, React - reactjs

I am developing a web app which is using Django-rest for the backend, react-admin for the frontend, and firebase for authentication. Currently, I am developing the user part and have faced an issue. I have not used firebase before and the docs provided in firebase are not very clear to me.
The problem that I am having is that when I try to log in from the frontend it gives me access and lets me inside the website for a second and then it kicks me giving a 401 unauthorized status error and on the screen, a message pops up saying that my session has expired. When I check the console, everything is synced up and reads all of my credentials, generates a uid but somehow it denies it.
Here is the code.
This is the view from django
This is my react-admin setup
Could someone experienced help with my issue or guide me somehow, please?

Related

Not able to see website on custom domain in Firebase?

I am trying to show a website on the custom domain using firebase, but not able to see. I tried to check all the errors but had no luck. Also to troubleshoot I had created a new react app and deployed and redirected that to the custom domain but the error shows the same as in the below screenshot.
Please will any experts let me know how can I configure the firebase app to show on the custom domain.
Please see the error below:
The website is perfectly running on the firebase default domain.

React Facebook Login not working on production

I have been trying to use react facebook login libraries for social authentication. In a local setup using a ngrok domain its working well but on my remote server where I add my app domain login status becomes cancelled. May someone help me understand where I may be getting it wrong. I have used react-facebook-login, react-social-login, #greatsumini/react-facebook-login - and I seem to be getting the same problem

Passport auth in express backend using React Native/Expo

I've been working on a companion app in React Native/Expo for a MERN web app that I created. In the back end, I have an Express server with Passport to authenticate users to Spotify as part of the sign in process, bound to the route /auth/spotify. On my web app, if I click the login button I'm redirected to the Spotify auth page. However, I can't seem to get it to work on React Native. Currently I'm using axios to send a GET request to /auth/spotify but it's seemingly not doing anything. I've checked the logs and the auth route is returning a 302 status, but the /callback url is never accessed. In the callback I have a console.log plus some code that accesses the database, but I've confirmed that neither of them are run when trying to auth from React Native.
I looked for tutorials but a lot of the stuff I found was outdated or used deprecated packages, so I'm kind of lost right now. Would greatly appreciate it if someone could point me in the right direction. Thanks!

Salesforce Oauth Error. 1814 : An unexpected error has occured during authentication

I am creating a meteor app which has login through salesforce using oauth. The login happens through a community app. For the oauth credentials I created a connected app on salesforce(sandbox) with full access.
Initially the login was working fine but then after a few days I started getting the following error.
We can't authorize you because of an OAuth error.
1814 : An unexpected error has occured during authentication. Please try again
But after this when I attempt the login again (i.e. going back to app screen from the salesforce error screen)from my app, I receive the access code from salesforce and I am able to fetch data through salesforce apis.
I tried looking for this error but did not find anything useful.
Any help would be appreciated. Thanks in advance.

Salesforce Mobile SDK Issue Login "Receiving Remote Access Authorization Error"

I am using the salesforce mobile sdk to develop an application in native IOS. I was doing some testing logging in as a user. All was fine. Then I logged out. When I logout I call the coordinator revoke authentication method. I then tried to login as a new user who had never logged into the device and I received the following error: "Receiving Remote Access Authorization Error there was a problem in setting up your remote access." I then selected the Not me link and it logged me out. However, when I tried to login again as the user that wasn't able to login it takes me to the salesforce website for that user?!!!! It did not take me to the application but to the salesforce website? Anyone know why first the error above occurs? Does it have to do with a possible token issue? Also why would I be driven to the salesforce website when I try to login as the user again?
Note: The salesforce login is in its own webview component. I had a button to force a logout no matter where I am in the app. When I force the logout and try to login as the person it then takes me to the application. Very confused in terms of what is going on in this scenario.
There is potentially a solution posted here, or at least some clues: seems to suggest a timing issue and refreshing the web view in applicationDidBecomeActive might fix it
https://developer.salesforce.com/forums/ForumsMain?id=906F00000009CBgIAM
Also more information here:
http://help.salesforce.com/apex/HTViewSolution?id=000175700&language=en_US
You might also try making sure that you have a Connected App properly set up under Setup/Create/Apps, and that the key and return URL match those hardcoded in your app.

Resources