UseKeyp / usekeyp-js-sdk

https://keyp-ui-library-test.surge.sh
MIT License
4 stars 0 forks source link

[SDK] Enable local api testing #61

Open pi0neerpat opened 1 year ago

pi0neerpat commented 1 year ago

Enable testing against our local development api using process.env

pi0neerpat commented 1 year ago

Some variable such as process.env.KEYP_LOCAL_API_DOMAIN should set the value for the API

jahabeebs commented 1 year ago

Some variable such as process.env.KEYP_LOCAL_API_DOMAIN should set the value for the API

@pi0neerpat I renamed the variable and pushed my changes but still have not had luck getting past the SSL blocker. Also in the changes I pushed you have to change the resolutions in the next-app package.json to be your local path to the js-sdk. My next-app .env looks like this currently:

KEYP_LOCAL_API_DOMAIN=http://localhost:4001 KEYP_CLIENT_ID=keyp_app... NEXTAUTH_URL=http://localhost:3000 KEYP_COOKIE_SECRET=COOKIE_SECRET_HERE NODE_TLS_REJECT_UNAUTHORIZED=0

jahabeebs commented 1 year ago

https://next-auth.js.org/errors#signin_oauth_error write EPROTO 009E26F401000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355: { error: { message: 'write EPROTO 009E26F401000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n', stack: 'Error: write EPROTO 009E26F401000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n' + '\n' + ' at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)', name: 'Error' }, providerId: 'keyp', message: 'write EPROTO 009E26F401000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n' }

jahabeebs commented 1 year ago

@pi0neerpat For the common name did you put your IP address or a localhost url?

Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:New York Locality Name (eg, city) []:New York City Organization Name (eg, company) [Internet Widgits Pty Ltd]:Bouncy Castles, Inc. Organizational Unit Name (eg, section) []:Ministry of Water Slides Common Name (e.g. server FQDN or YOUR name) []:server_IP_address Email Address []:admin@your_domain.com