-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
What is the issue?
I use this method to authenticate user with
@PostMapping("/pusher/user-auth")
public ResponseEntity userAuthP() {
System.out.println("POST user auth");
PusherOptions options =
new PusherOptions()
.setUserAuthenticator(new HttpUserAuthenticator("http://127.0.0.1:5500/checkonline.html"));
com.pusher.client.Pusher pusher = new com.pusher.client.Pusher(key, options);
pusher.signin();
Map<String, String> stringStringMap = new HashMap<>();
stringStringMap.put("auth", "user");
stringStringMap.put("user_data", "test");
return ResponseEntity.ok(stringStringMap);
}
In FE, I use
pusher.signin();
const watchlistEventHandler = (event) => {
console.log("Watching list", event);
};
pusher.user.watchlist.bind('online', watchlistEventHandler);
pusher.user.watchlist.bind('offline', watchlistEventHandler);
but check in console log

How can I config with java in right way?
CC @pusher/mobile
Metadata
Metadata
Assignees
Labels
No labels