electrode-io / electrode-ota-server

Electrode Over The Air Server for hot deployment of React Native and Cordova mobile apps
Other
204 stars 40 forks source link

Bell.js provider authentication configuration #100

Closed codestersunion closed 5 years ago

codestersunion commented 5 years ago

Is there an example of how to configure OTA to authenticate with a non-Github provider that is listed as on of Bell's supported providers?

I am using the following options under electrode-ota-server-auth and it results in a " Cannot read property 'register' of undefined" message on server start:

"strategy": {
          // "github-oauth": {
          //   "enable": false
          // },
      "gitlab": {
            "options": {
              "provider": "gitlab",
              "location": "https://127.0.0.1:9001",
              "config": {
                "uri": "https://<uri>/",
              },
              password: "Foobarshibbyfoobarshibby",
              "scope": ['profile', 'email'],
              forceHttps: true,
              "clientId": "<id>",
              "clientSecret": "<secret>",
            },
            "session": {
              "options": {
                "cookie": "wm-ota-auth",
                "isSecure": true,
              },
              "scheme": "cookie",
              "module": "hapi-auth-cookie",
              "validate": "session",
            },
          }
}

It seems like it is not getting registered as a plugin, but I can't figure out how to tell it to do that.

codestersunion commented 5 years ago

The issue turned out to be that I needed the module: "bell" under gitlab and the github-oauth needed to be turned off and removed from the providers list.