Niels-Be / Coffee-light

7 stars 3 forks source link

Allow sending messages of third party apps on behalf of user #21

Open Niels-Be opened 7 years ago

Niels-Be commented 7 years ago

Allow signing api requests with user tokens to allow third party apps to act on behalf of a user. We also need a way to get a token in the frontend. To get a token: auth.currentUser.getIdToken().then((token)=>{ ... })

It might also be useful to implement an extend notify endpoint so third party apps can specify a custom notify message. e.g. Lunch App: "%u wants to eat at xxx"

Niels-Be commented 7 years ago

Curl example:

curl -H 'Authorization: bearer eyJhb[...]6wj5vIQ' localhost:8080/api/v1/subscriptions