why does react admin send multiple requests for the same resource list without any interaction - react-admin

Why does react admin send multiple requests for the same resource list without any interaction? and is it ok?

Related

How to share user session in React Native App and WebView component

I have an application that shares backend with a web. This application has basic email/password login that returns Access Token which is being sent as a header for any other requests. The application also has a screen that is a WebView which displays the web version of this app.
My problem is that I don't know how to share user session between RN app and the WebView. When the user logs in the application it should also log him in the WebView page and if the user logs out it should log him out the WebView aswell.
Is there any way, to inform the WebView that user has logged in and that he should be logged in in the WebView as well?
I tried sending the Authorization header in the WebView source but it doesn't work. https://github.com/react-native-webview/react-native-webview/blob/master/docs/Guide.md#working-with-custom-headers-sessions-and-cookies
Any auth is based on a secret. First, you need to decide what is your secret, it can be a session identifier or jwt token. Then you can communicate between React Native -> Web and back Web -> React Native
follow this guide communicating-between-js-and-native and share your knowledge about this secret and use it for your requests.
Related to custom headers this will set the header on the first load, but not on subsequent page navigations.

how to code- send connection/friend request in react native app

Functionality: Send a connection/friend request to another user of the same app built on react native
Can anyone please suggest how do I code this functionality
You are trying to make a social app. Rather than sending in-app notifications and friend requests , you should structure your app properly about how the requests flow will be processed via backend. That's how facebook , instagram does , they have their servers for each functionality and upon click of any request buttons in the app ,those api's are called and respective friend requests are sent to the user. So structure your code-architecture first.
Do find the link below , it may help you
React native social app

How to manage user state in Firebase authentication within a SSR Nuxt.js application?

As the title suggests, how to manage the user state in Firebase authentication within an SSR Nuxt.js application? The following conditions should be met after a successful login:
Users should be able to visit protected resources when navigating
between pages
Users should be able to reload browser and still be signed into the
application. They shouldn't be redirected to the login screen
Firebase's default behaviour is to persist the user's session
even after the user closes the browser. Users should not have to
login to the application again if they close their browser and reopen
it and when there is still a valid Firebase user available
I was able to solve this problem by using the following:
Express server - using axios posts to manage the login on receiving
the request save the user ID in the session and save the access token
in a cookie
Vuex - store user state so easily accessible within my Nuxt application
Nuxt server middleware - used to check the authentication status of
the user on the server. Looking for user ID in the session or the
access token in a cookie that would have been created on login
Access to the code containing a working, running example of this scenario can be found in this GitHub repository.
I have also written a more detailed blog entry regarding all the important files used in the project.

Dynamic callback URL's for Instagram Auth

I have different clients using my cloud app.
They all have different URL's to access the cloud application. They have the option to add Instagram as a social media channel and perform multiple tasks over it.
Now to perform any action over Instagram, they all need to authenticate themselves via myInstagram App. So I need to manually put a new callback URL every time a new client request for Instagram. Is there is any way to make Callback URL's dynamic on Instagram?

Admin app with React - how not to expose APIs until login succeeds?

Here is the workflow I want to implement for admin module of a site
Show a login screen - will be a React component
If login fails, the above component will show an error message
If login succeeds, the view changes. The new view should contain links to APIs /addProduct and /deleteProduct
One way is to create one single App but I don't want to expose API urls to the client unless the login succeeds.
How do I achieve UI seperation here?
I would say that you have two options:
Use the login response to return the list of links.
Have a set endpoint that only works with an authenticated client that returns the list of links.