how to test Onesignal push notifications on localhost?

Abdelaziz Mokhnache picture Abdelaziz Mokhnache · Oct 3, 2017 · Viewed 12.5k times · Source

I want to test OneSignal push notifications on localhost before I deploy my app to a remote server.

I followed the instructions provided by the documentation. When I enter http://localhost as the site url I get an error message that says:

localhost is already taken. Please enter a different name.

Is there a way to use OneSignal on localhost ?

Answer

Abdelaziz Mokhnache picture Abdelaziz Mokhnache · Oct 3, 2017

It should be https://localhost not http://localhost. OneSignal treats localhost as secure connections.