Provide data from websockets in react-admin - react-admin

I am never worked with js and react-admin, but i have task where i should send data from back-end to react-admin via websocket.
I can't understand how to do it. I saw part of documentation about this topic, but it's too hard for me. I can't understand how i should connect data provider to web socket, and how to use it.
Maybe someone have some examples? Or can explain this to me in more simple terms

Related

grpc authentication using email

I'm completing a python grpc server function-wise and being ready for deployment. Thusfar I have unsecure communication (pretty much the helloworld example when it comes to security). I thought I could put in place an authentication mechanism for my server in a reasonable amount of time after I observed that there was some documentation on this very topic provided by google. Closer investigation let me to believe otherwise.
The case is simple: Users (fellow colleagues of mine) login to their company mail (gmail) and use the resulting token (JWT, OAuth, OAuth2, I don't care) to gain access to the grpc server I wrote. No one else gets in.
Since googling grpc+authentication has been fruitless so far I believe I'm on the wrong track on how I should approach this kind of problem. So therefore the questions:
Given this use case, should my grpc server have any concern with authentication? If so, are there examples? Or should this be handled by a different system? If so, what system?
I noticed a lot of articles mentioning Envoy+gRPC. Can Envoy help me out here? Is it designed to deal with this?
The gRPC authentication can follow the same approach of a normal HTTP, the only thing you need to have in mind is that the authentication check would be placed in an gRPC interceptor and you will be looking at the metadata to get the creadentials. Unfortunately, I don't have an example to do it with Python but you can search in "how to add gRPC Server interceptors in Python" and then "how to work with gRPC metadata in Python"
Here an example in Golang, maybe it can give you the idea

Architecture and technologies of an instant chat app in flutter

I want to build an instant chat app with flutter without any third party services.
I've been working in a simple app using a restful laravel api for login, multiple methods and logout, using token authentication for each request. However, I find that architecture not suitable for a modern instant chat. I discovered WebSockets, which sound great, but can't yet grasp how I could subscribe to and consume one from flutter. I´ve read about web channels, but I'm not sure how they handle authentication for users. Is it possible to handshake and establish a session from my app? If so, how?
Or, can it be done totally restful? How could I post messages and listen other user's messages in that case?
Besides the chat functionality, is it recommended to work restfully? Or is flutter able to mantain a solid, authenticated session? I'm kinda new in flutter.
I appreciate any info, link or recommendation. Please, refrain if you were going to mention firebase, I want to build my own backend. Thanks!!
You should check out MQTT, an IOT protocol which is currently used for chat applications very widely.
To know about MQTT, see this.
But first I will recommend you to understand Pub-Sub(Publisher-Subscriber) Model, if you understand it then that's great.
For pub-sub model, see this.
Or, can it be done totally restful? How could I post messages and listen other user's messages in that case?
Yes, it can be done totally restful but honestly it's not recommended. You should do it with websockets.
Besides the chat functionality, is it recommended to work restfully? Or is flutter able to maintain a solid, authenticated session? I'm kinda new in flutter.
Depends on your architectural choice. There are many good options on which architecture you want to choose. Apart from restful there is GraphQL also, if you are comfortable with it. Apart from chat functionality mostly you will see people using RESTful but people who know GraphQL, might also use that instead of RESTful.

How to implement oauth2 to external api in meteor app

I'm writing, beacuse i'm having trouble trying to implement a method to auntenticate oauth2 in a meteor APP (using react in view). In this case i have to connect to my own autentication server running in .net. I have read some tutorials with facebook, github, etc, but in my case is different
Anyone have any code, tutorial or know how to implement?.
Thanks
PD: i'm new using Meteor.
There is a meteor package for OAuth2 here
https://atmospherejs.com/meteor/oauth2
It doesn't provide much information, except directing you to the Meteor accounts documentation at https://guide.meteor.com/accounts.html
There is also this page, which provides examples of both client and servers for OAuth2. I haven't explored it myself, but it looks like a good start. I always like to look at examples myself when picking up something new :)
https://github.com/prime-8-consulting/meteor-oauth2

Steps to take in order to register an external login using Web API

I'm having a lot of trouble finding an example of how to wire up a client to use external auth in a web api service. Any questions I find similar to this have responses pointing to the same couple of blog entries:
This one with an Angular front end
And this one on the Microsoft website
I really just want to know what AJAX calls I need to make to the service in order to register and login to it using external authentication. If anyone can help me, I'd really appreciate it. This has turned into a frustrating ordeal that should have been pretty straight forward.

Alamofire Router and URLRequestConvertible

I'm having trouble converting my ObjectiveC AFNetworking Request and Response Serializers to something in line with Alamofire best practices. I have several different endpoints that I need to connect to, and two of them share the same OAuth1 authentication system, but their request formats are different. How would I design a system around URLRequestConvertible that would allow me to share the OAuth authentication code with the 2 Routers that are specific to their endpoints?
The best place to start is the Advanced Section in Alamofire README. There are some good examples of how to start designing a Router type.
From there, you should post some sample code that we can work with you on. That way we can tell exactly what you're trying to do.