GetStream.com question: how can a user that posted something delete/edit his post - getstream-io

Following GetStream.com documentation, I implemented an example react native app.
Is there a way to delete or update posts? From the StatusUpdateForm component or from the platform dashboard.

Updating posts (activities) are only supported server side so it can't be done by a client directly.
Deleting posts is supported by client side auth. However, support in the library isn't there though. Created a ticket for it.

Related

create space/room and send message via google-api in node.js

Case: Google Chat support in node.js using the googleapis library.
I studied the documentation, created a service account and implemented authentication. In first step I used the chat.spaces.list() method and it worked (no error returned).
I want to send a message via chat, so I wanted to create a new space, I found the chat.spaces.create method (https://developers.google.com/chat/api/reference/rest/v1/spaces/create) Unfortunately, this method is not present in "googleapis" for node.js In general, I see that the list of methods in "googleapis" is different than the one in the documentation. Only spaces in the documentation, but spaces and rooms in the library... I'm lost. How to do it? Any tips?
I see that the list of methods in "googleapis" is different than the one in the documentation
I think you are seeing wrong documentation. Your reference link is REST API documentation. The nodejs googleapis client documentation you can see on https://googleapis.dev/nodejs/googleapis/latest/chat/classes/Resource$Spaces.html.
And also based on the REST API documentation, the API that you looking for(create space) is not general available.
† Supports user authentication in Developer Preview. App authentication isn't available.
You need to join Google Workspace Developer Preview Program to access that feature.

How can I implement server sent events (SSE) in SvelteKit?

I can't find a tutorial for SvelteKit without using custom express server. Are there any alternatives with an API endpoint?
I've tried setting up the API endpoint myself, but I can't make it send an update when the data changes.
You would probably have to return a ReadableStream that you can write the updates to. That way the connection is not closed.
As of now there is an open issue regarding more documentation on this.

How To Implement Alerts Using Node.js And Express

The Problem I'am having is trying to find a way to successfully implement the ability to have alerts pop up on my Node.js web application.
I have tried to implement libraries such as "Flash" and different variations of flash e.g. "connect-flash", "express-flash" but non of which have seemed to work.
The alert should pop up once an api request has been sent successfully
I'm using these technologies...
Express, Passport, Session, Router etc...
Hopefully the community will be able to provide a suitable solution/example to my issue
Link to project code....
https://github.com/EthanMcCracken/GradedUnitProject
Many Thanks
Ethan

How to setup OAuth 2.0 server using loopback.io

I have set up OAuth as per the docs and this link https://strongloop.com/strongblog/node-js-loopback-api-gateway-sample-applications/.
There are a few issues in understanding the usage of the code base and flow based on the options of loopback-component-oauth2. Is there a tutorial that covers each section or a working implementation for Implict, AuthorizationCode, Refresh token, JWT.
I have been able to secure API (eg: /api/Notes) as per docs and it does seem to be blocking requests but is not allowing me to authenticate. More, when I make a request to /oauth/token this API is also throwing Unauthorized 401 errors - both from REST Client like postman and https://loopbacklocalhost/explorer.
I am using loopback 3.0. I am having tough time with the component not documented completely nor having a doc aligned example code. May be I am missing something here.
I have seen this hub repo as well and seems they use passport directly and is documented very less making it difficult to integrate things easily.
https://github.com/strongloop/microgateway
Note: I have gone through the following question, the archive repo tests.
How to setup OAuth 2.0 server using loopback
Any help is welcome.

authentication with a third party provider

I'm developing an api server in (NodeJs/ hapi) coupled with an android application.
I'm having a problem understanding how to do login via a third party like google and facebook.
So far my strategy is:
authorize my app(android)
get the email and other data from google/facebook(android)
Send email and data to my server and save it in a database(server)
Next time when authentication. I'll just check the same data(from google) against the save data(my server).
I'm pretty sure there is a better way to do it, but the documentation I have read so far leave me with a head ache.
Help is appreciated.
I just setup a demo project using ExpressJS.
It would be interesting to have a fork for Hapi.
Check it out if want: http://git.io/RHnjBg

Resources