fix (backend-rs): convert base64 encoded keys into base64url
This commit is contained in:
parent
6442364341
commit
3f399bc067
|
@ -59,8 +59,10 @@ pub async fn send_push_notification(
|
|||
let subscription = SubscriptionInfo {
|
||||
endpoint: endpoint.to_owned(),
|
||||
keys: SubscriptionKeys {
|
||||
p256dh: publickey.to_owned(),
|
||||
auth: auth.to_owned(),
|
||||
// convert standard base64 into base64url
|
||||
// https://en.wikipedia.org/wiki/Base64#Variants_summary_table
|
||||
p256dh: publickey.replace('+', "-").replace('/', "_").to_owned(),
|
||||
auth: auth.replace('+', "-").replace('/', "_").to_owned(),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue