webpush-java icon indicating copy to clipboard operation
webpush-java copied to clipboard

Requires parameters that aren't provided by client side

Open Oberonc opened this issue 2 years ago • 0 comments

This library force the user to get 2 parameters from the client side that simply dont exist in other implementations:

// Get public key and user auth from the subscription object
    var key = subscription.getKey ? subscription.getKey('p256dh') : '';
    var auth = subscription.getKey ? subscription.getKey('auth') : '';

For example, nothing about these parameters shows here. In Elemental2 there is no "getKey" in the API as seen here:

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class PushSubscription {
  public String endpoint;
  public PushSubscriptionOptions options;
  public String subscriptionId;

  public native Promise<Boolean> unsubscribe();
}

Oberonc avatar Oct 25 '22 08:10 Oberonc