<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create JWT on the client side for sample application creation in Discussion Forum</title>
    <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12401#M260</link>
    <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;We have tried using your sample apps as well but there also we are encountering issues, Is there any alternative ? Also would it be possible that someone from you technical team could help us resolving our errors so that we can built a demo application successfully and showcase it to our client ?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 08:05:12 GMT</pubDate>
    <dc:creator>deepikagarg0304</dc:creator>
    <dc:date>2023-08-07T08:05:12Z</dc:date>
    <item>
      <title>How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12391#M257</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create application by following this sample:&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/in-app-calling/getting-started/javascript/create-app/" target="_blank" rel="noopener"&gt;https://developers.sinch.com/docs/in-app-calling/getting-started/javascript/create-app/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have followed all the steps. But when I run the app using http-server I am getting errors in the below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;#sinchClientListener() {
        return {
            onCredentialsRequired: (sinchClient, clientRegistration) =&amp;gt; {
                // TODO: implement this in a backend server
                new JWT(APP_KEY, APP_SECRET, sinchClient.userId)
                    .toJwt()
                    .then(clientRegistration.register)
                    .catch((error) =&amp;gt; {
                        clientRegistration.registerFailed();
                        console.error(error);
                    });
            },&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sinch-rtc-min.js:2 ReferenceError: JWT is not defined
    at Object.onCredentialsRequired (index.js:74:17)
    at Pr.listen (sinch-rtc-min.js:2:454532)
    at sinch-rtc-min.js:2:388643
    at Array.forEach (&amp;lt;anonymous&amp;gt;)
    at Et.onEvent (sinch-rtc-min.js:2:388625)
    at sinch-rtc-min.js:2:448935
    at new Promise (&amp;lt;anonymous&amp;gt;)
    at fr.&amp;lt;anonymous&amp;gt; (sinch-rtc-min.js:2:448897)
    at Generator.next (&amp;lt;anonymous&amp;gt;)
    at sinch-rtc-min.js:2:446584
(anonymous) @ sinch-rtc-min.js:2
a @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
SinchClientWrapper @ index.js:28
(anonymous) @ index.js:229
index.js:67 Sinch - Start client failed
index.js:68 _r {message: 'Unable to create instance!', code: 500, domain: 2}
onClientFailed @ index.js:68
listen @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Et.onEvent @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
failed @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
a @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
SinchClientWrapper @ index.js:28
(anonymous) @ index.js:229


sinch-rtc-min.js:2 Uncaught (in promise) Error: Unable to register ServiceWorker: sw.js
    at vr.create (sinch-rtc-min.js:2:451928)
    at new br (sinch-rtc-min.js:2:452526)
    at wr.createPushWorker (sinch-rtc-min.js:2:453212)
    at Br.&amp;lt;anonymous&amp;gt; (sinch-rtc-min.js:2:468789)
    at Generator.next (&amp;lt;anonymous&amp;gt;)
    at sinch-rtc-min.js:2:466917
    at new Promise (&amp;lt;anonymous&amp;gt;)
    at Lr (sinch-rtc-min.js:2:466662)
    at Br.setSupportManagedPush (sinch-rtc-min.js:2:468655)
    at new SinchClientWrapper (index.js:27:21)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:04:39 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12391#M257</guid>
      <dc:creator>deepikagarg0304</dc:creator>
      <dc:date>2023-08-04T13:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12400#M259</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You must create your own JWT in this instance.&amp;nbsp; You have not provided the JWT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will review the instructions and make sure they are clearer to follow and implement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the meantime please use these samples as a reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sinch/rtc-reference-applications/tree/master/javascript/samples" target="_blank"&gt;https://github.com/sinch/rtc-reference-applications/tree/master/javascript/samples&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is examples ready to use and the jwt and crypto functions are included.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 07:29:02 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12400#M259</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-07T07:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12401#M260</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;We have tried using your sample apps as well but there also we are encountering issues, Is there any alternative ? Also would it be possible that someone from you technical team could help us resolving our errors so that we can built a demo application successfully and showcase it to our client ?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:05:12 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12401#M260</guid>
      <dc:creator>deepikagarg0304</dc:creator>
      <dc:date>2023-08-07T08:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12413#M261</link>
      <description>&lt;P&gt;Sorry to hear you are having issues with the samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check which sample you are using and what Browser supports it in the compatibility matrix here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.sinch.com/docs/in-app-calling/js/miscellaneous/" target="_blank"&gt;https://developers.sinch.com/docs/in-app-calling/js/miscellaneous/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please could you provide the Console output from Chrome / Firefox from when you start the client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 11:35:24 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12413#M261</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-07T11:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12415#M263</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chrome and Firefox are unable to support http for our samples currently.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the interim you will have to serve via https and will need either:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A locally-trusted development certificate for local development (see mkcert for this)&lt;/LI&gt;
&lt;LI&gt;Or serve the content on a https hosted environment you have (your hosting provider will take care of the https certificates)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Mkcert can create locally-trusted development certificates&amp;nbsp; (&lt;A href="https://github.com/FiloSottile/mkcert" target="_blank"&gt;https://github.com/FiloSottile/mkcert&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;I use this method and serve the samples fine with https.&amp;nbsp; Please follow the instructions for your environment, ensuring to follow the advise not to share your cert (&lt;A href="https://github.com/FiloSottile/mkcert#installation)" target="_blank"&gt;https://github.com/FiloSottile/mkcert#installation)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As is the normal basic hosting recommendation i&lt;EM&gt;&lt;STRONG&gt;t is not safe to serve any content over http in a production environment.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 09:27:22 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12415#M263</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-08T09:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12425#M265</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply, I have followed the steps you provided and used mkcert to run the http-server using the .crt and .key files.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;but I am still not able to proceed. As I launch the application and enter Application key, secret and user id and hit on audio button I am getting errors. Could you please help on this ?&lt;/P&gt;
&lt;P&gt;Error details below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;An SSL certificate error occurred when fetching the script.
index.html:1 Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('https://192.168.1.7:8080/voicecall/') with script ('https://192.168.1.7:8080/voicecall/sw.js'): An SSL certificate error occurred when fetching the script.
sinch-rtc-min.js:2     POST https://ocra.api.sinch.com/ocra/v2/applications/dc53b66d-edbb-45d1-a43b-a59831a1a500/instances 401
(anonymous) @ sinch-rtc-min.js:2
o @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
o @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
e @ sinch-rtc-min.js:2
fetchApi @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
e @ sinch-rtc-min.js:2
request @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
xe @ sinch-rtc-min.js:2
createInstanceRaw @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
xe @ sinch-rtc-min.js:2
createInstance @ sinch-rtc-min.js:2
createInstance @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
register @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Promise.then (async)
onCredentialsRequired @ VoiceCallSinchClientWrapper.js:46
listen @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Et.onEvent @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
createInstance @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
VoiceCallSinchClientWrapper @ VoiceCallSinchClientWrapper.js:20
(anonymous) @ index.js:3
sinch-rtc-min.js:2 Response {type: 'cors', url: 'https://ocra.api.sinch.com/ocra/v2/applications/dc53b66d-edbb-45d1-a43b-a59831a1a500/instances', redirected: false, status: 401, ok: false, …}body: (...)bodyUsed: falseheaders: Headers {}ok: falseredirected: falsestatus: 401statusText: ""type: "cors"url: "https://ocra.api.sinch.com/ocra/v2/applications/dc53b66d-edbb-45d1-a43b-a59831a1a500/instances"[[Prototype]]: Response
(anonymous) @ sinch-rtc-min.js:2
a @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
VoiceCallSinchClientWrapper @ VoiceCallSinchClientWrapper.js:20
(anonymous) @ index.js:3
VoiceCallSinchClientWrapper.js:54 Sinch - Start client failed
VoiceCallSinchClientWrapper.js:55 _r {message: 'Unable to create instance!', code: 500, domain: 2}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 18:49:15 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12425#M265</guid>
      <dc:creator>deepikagarg0304</dc:creator>
      <dc:date>2023-08-08T18:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12426#M266</link>
      <description>&lt;P&gt;Can you share with me:&lt;/P&gt;
&lt;P&gt;The Web browser you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using mkcert with a fake local development domain name.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For reference, I use the command below to start the webserver using node.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;npx http-server -S -C certificate.pem  -K key.pem&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.npmjs.com/package/http-server" target="_blank"&gt;https://www.npmjs.com/package/http-server&lt;/A&gt;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-S&lt;/CODE&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;--tls&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;--ssl&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Enable secure request serving with TLS/SSL (HTTPS)&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;false&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-C&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;--cert&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Path to ssl cert file&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;cert.pem&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;-K&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;--key&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;Path to ssl key file&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;key.pem&lt;/CODE&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you created the cert what did you use for a domain and wilcard? e.g.&lt;/P&gt;
&lt;PRE class="notranslate"&gt;&lt;CODE&gt;mkcert -key-file key.pem -cert-file cert.pem yourdomainfakeone.com *.yourdomainfakeone.com&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can check by looking at your pem with openssl&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;openssl x509 -in yourcert.pem -noout -text&lt;/LI-CODE&gt;
&lt;P&gt;And check the&amp;nbsp; X509v3 Subject Alternative Name:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; X509v3 Subject Alternative Name:
                DNS:yourdomainfakeone.com, IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1&lt;/LI-CODE&gt;
&lt;P&gt;Now in your /etc/hosts (same for Linux Mac or Windows)&lt;/P&gt;
&lt;P&gt;Update as follows (make sure the IP is one the webserver is bound to)&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;192.168.1.7 yourdomainfakeone.com&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Now you can point your web browser at https://yourdomainfakeone.com:8080&amp;nbsp;and try and start the Sinch client.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 19:05:10 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12426#M266</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-08T19:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12428#M267</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;The files which were created for me by mkcert are cert.crt , cert.key, ca.crt and ca.key.&lt;/P&gt;&lt;P&gt;Could you please help me know how I create .pem file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I follow the instruction on this url -&amp;nbsp;&lt;A href="https://github.com/FiloSottile/mkcert#installation)" target="_blank"&gt;https://github.com/FiloSottile/mkcert#installation)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am&amp;nbsp; getting below responses on running these commands:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS C:\Projects\SinchApp&amp;gt; mkcert --version&lt;BR /&gt;1.5.1&lt;BR /&gt;PS C:\Projects\SinchApp&amp;gt; mkcert -CAROOT&lt;BR /&gt;error: unknown option '-CAROOT'&lt;BR /&gt;PS C:\Projects\SinchApp&amp;gt; mkcert -install&lt;BR /&gt;error: unknown option '-install'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please guide me with the right way if using mkcert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS - I am using it for Javascript sample of Sinch.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 17:39:25 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12428#M267</guid>
      <dc:creator>deepikagarg0304</dc:creator>
      <dc:date>2023-08-09T17:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12431#M270</link>
      <description>&lt;P&gt;The github repo of mkcert has this issue recorded.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;unknown option '-install' on windows 11&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://github.com/FiloSottile/mkcert/discussions/437" target="_blank"&gt;https://github.com/FiloSottile/mkcert/discussions/437&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution was There is another mkcert installed in the %PATH%. You are calling the first one, which doesn't have the install option it seems. Perhaps it was installed by another development program you are using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 21:23:26 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12431#M270</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-09T21:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12435#M272</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to create cert.pem and key.pem files using mkcert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used this command&amp;nbsp; for domain and wildcard:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; C:\Projects\SinchDemoApp\rtc-reference-applications\javascript&amp;gt; mkcert -key-file key.pem -cert-file cert.pem mysinchdemoapp.com *.mysinchdemoapp.com      

Created a new certificate valid for the following names &lt;span class="lia-unicode-emoji" title=":scroll:"&gt;📜&lt;/span&gt;
 - "mysinchdemoapp.com"
 - "*.mysinchdemoapp.com"

Reminder: X.509 wildcards only go one level deep, so this won't match a.b.mysinchdemoapp.com &lt;span class="lia-unicode-emoji" title=":information:"&gt;ℹ️&lt;/span&gt;

The certificate is at "cert.pem" and the key at "key.pem" &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&lt;/LI-CODE&gt;&lt;P&gt;After that I am running my server with below command :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;npx http-server -S -C cert.pem -K key.pem&lt;/LI-CODE&gt;&lt;P&gt;But it says my server is up at:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Starting up http-server, serving ./ through https

http-server version: 14.1.1

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  https://192.168.1.7:8080
  https://127.0.0.1:8080
Hit CTRL-C to stop the server&lt;/LI-CODE&gt;&lt;P&gt;After that If I run my app at :&amp;nbsp;&amp;nbsp;&lt;A href="https://192.168.1.7:8080/" target="_blank"&gt;https://192.168.1.7:8080/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It is crashing after I enter the Application key and secret and userID :&lt;/P&gt;&lt;P&gt;I am getting these errors :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;An SSL certificate error occurred when fetching the script.
index.html:1 Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('https://127.0.0.1:8080/voicecall/') with script ('https://127.0.0.1:8080/voicecall/sw.js'): An SSL certificate error occurred when fetching the script.
sinch-rtc-min.js:2     POST https://ocra.api.sinch.com/ocra/v2/applications/dc53b66d-edbb-45d1-a43b-a59831a1a500/instances 401
(anonymous) @ sinch-rtc-min.js:2
o @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
o @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
e @ sinch-rtc-min.js:2
fetchApi @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
e @ sinch-rtc-min.js:2
request @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
xe @ sinch-rtc-min.js:2
createInstanceRaw @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
xe @ sinch-rtc-min.js:2
createInstance @ sinch-rtc-min.js:2
createInstance @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
register @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Promise.then (async)
onCredentialsRequired @ VoiceCallSinchClientWrapper.js:46
listen @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Et.onEvent @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
createInstance @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
dr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
VoiceCallSinchClientWrapper @ VoiceCallSinchClientWrapper.js:20
(anonymous) @ index.js:3
sinch-rtc-min.js:2 Response {type: 'cors', url: 'https://ocra.api.sinch.com/ocra/v2/applications/dc53b66d-edbb-45d1-a43b-a59831a1a500/instances', redirected: false, status: 401, ok: false, …}
(anonymous) @ sinch-rtc-min.js:2
a @ sinch-rtc-min.js:2
Promise.then (async)
u @ sinch-rtc-min.js:2
(anonymous) @ sinch-rtc-min.js:2
Lr @ sinch-rtc-min.js:2
start @ sinch-rtc-min.js:2
VoiceCallSinchClientWrapper @ VoiceCallSinchClientWrapper.js:20
(anonymous) @ index.js:3
VoiceCallSinchClientWrapper.js:54 Sinch - Start client failed
VoiceCallSinchClientWrapper.js:55 _r {message: 'Unable to create instance!', code: 500, domain: 2}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have followed all the instructions which you provided. Kindly guide me how to proceed here ?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:16:33 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12435#M272</guid>
      <dc:creator>deepikagarg0304</dc:creator>
      <dc:date>2023-08-11T10:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12439#M274</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have analysed your logs and am arranging to replicate this issue on Windows as I think the behaviour is due to your environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a problem with the service worker sw.js being served via 127.0.0.1. This should not be, so please can you &amp;nbsp;follow my step about updating the host file (as shown previously):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now in your /etc/hosts (same for Linux Mac or Windows)&lt;/P&gt;
&lt;P&gt;Update as follows (make sure the IP is one the webserver is bound to)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;192.168.1.7 mysinchdemoapp.com&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then access from&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://mysinchdemoapp.com:8080&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please check your service worker is being served from your domain.&amp;nbsp; (Chrome &amp;gt; Inspect &amp;gt; Application -&amp;gt; Service workers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-08-11 at 14.37.22.png" style="width: 999px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3482iBD6DED686F24F7E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-08-11 at 14.37.22.png" alt="Screenshot 2023-08-11 at 14.37.22.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;We will see if we can replicate this behaviour, as currently I am unable to do so on an *nix based operating system.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 17:40:14 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12439#M274</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-12T17:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create JWT on the client side for sample application creation</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12440#M275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have successfully used this method of using the mkcert method on Windows with Chrome and made a call with the javascript Voice SDK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two important steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Looks like mkcert is not able to update the root authority in Windows, but this command will work&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;certutil –addstore -enterprise –f "Root" &amp;lt;pathtocertificatefile&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. For it to work we found, using a new Chrome window with a new clean profile after installing the root authority will enable the client to start fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 11:13:41 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-JWT-on-the-client-side-for-sample-application/m-p/12440#M275</guid>
      <dc:creator>Roland_Ian</dc:creator>
      <dc:date>2023-08-14T11:13:41Z</dc:date>
    </item>
  </channel>
</rss>

