Samuel
However I do have a backend set up so if I had to that it wouldn’t be the end of the world
1 1
Skeets App
Am looking into that as well. What endpoint are you registering device tokens against? At least on iOS you cannot register decices against the official bsky backend because of differing signing keys (app, backend).
1 1
Skeets App
Even if you connect your FCM to your APNS account (which is possible), how are you getting the notifications from Bluesky to YOUR FCM instance?
2 2
Skeets App
As far as I understand the library it only handles the client-side of push notifications. The issue I have is that i don’t see a way to enable bsky to push notifications to firebase/apns that then get delivered to 3rd party apps. For that to work bsky would need the 3rd party‘s push certificate.
1
Samuel
Hmm not sure. The way the official app works is that it gets the device push token and sends it to bsky
2 1
Skeets App
Yeah and then bsky sends the push notifications using that token and a shared certificate (shared btw app and backend). APNS checks if the app it sends the notifications to has a matching certificate. That’s the problem I see. 3rd party apps have their own push credentials.
1 2
Ansh
Check the official app. You can register a push token for users with your particular push endpoint and it should work for Graysky. Email me if you have issues at ansh [at] blueskyweb [dot] xyz
3 4
Skeets App
What is the endpoint for? Will this be my „server“-endpoint that gets notified when there is a new push notification (and then delivers that push itself)? Or does bsky send the pushes to e.g. APNS directly? I always thought device tokens were bound to the bundle-id and the push cert? 🤷‍♂️
2
Ansh
The code looks something like this store.agent.api.app.bsky.notification.registerPush({ serviceDid: SERVICE_DID(store.session.data?.service), platform: devicePlatform, token: t, appId: 'xyz.blueskyweb.app', Notice how you can send an appId
2 5
Samuel
Host a did.json file in your backend and then use did:web:mybackend.com as the serviceDid
1
Skeets App
Have you out tried what will actually be sent to this endpoint? I'm looking for some way to authenticate accounts against my backend and was hoping this would be the way
1 1
Samuel
@samuel.fm
However I don’t think it’s suitable for authentication purposes. You could just send the bsky session token to your backend and then check it’s valid if you want to auth with your backend
2 1
Skeets App
Yeah, that's an option as well, but for privacy reasons I'd rather not have the auth token leave the device.
1 1
Samuel
Yeah but I mean, that’s what the session token is for. Obviously don’t send the refresh token but sending the session token is fine-ish imo so long as you discard it immediately and use your own session token from that point.
2 1
Samuel
Idk, open for discussion I guess. There’s not currently a way to auth on behalf of other services atm to my knowledge
1