# Demo app Authorization does nothing

**URL:** <https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961>\
**Category:** Electron\
**Created:** [August 12, 2020, 4:47pm UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961 "2020-08-12T16:47:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iMykola](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imykola/32/13259_2.png) [@iMykola](https://devforum.zoom.us/u/iMykola)\
**Post date:** [August 12, 2020, 4:47pm UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/1 "2020-08-12T16:47:33Z")

</div>

**Description**  
When putting jwt token and press SDKAuth token application does nothing. The page is reloaded and get me back to the same input. The log shows a message `AuthWithJwtToken 0` what looks like ok, no errors

Also not sure what I have to put into the first input when placeholder is ‘input domain’. Just left is as-is.

**Which version?**  
MacOS 10.15.6  
electron 5.0.2  
v5.0.24433.0616  
mac native sdk version:All\_mac\_sdk\_5.0.24433.0616

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Build an SDK on mac `build_nodeaddon_mac.sh`
2. Run demo app `run_demo_mac.sh`
3. Fill in JWT and press SDKAuth button

**Additional context**  
JWT Payload

```auto
{
    "appKey": <SDK key>,
    "iat": 1597249389795,
    "exp": 1597940672750,
    "tokenExp": 1597940672750
}

```

Thanks in advance

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 13, 2020, 5:27am UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/2 "2020-08-13T05:27:45Z")

</div>

Hi @iMykola,

The domain should be “[zoom.us](http://zoom.us)”. Based on the description, your JWT token is invalid. Please note that the timestamp in the JWT token should be in second, if you generate the timestamp from JavaScript functions, you will have to convert it to seconds.

Thanks!

---

<div class="post-metadata">

**Author:** ![iMykola](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imykola/32/13259_2.png) [@iMykola](https://devforum.zoom.us/u/iMykola)\
**Post date:** [August 13, 2020, 9:51am UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/3 "2020-08-13T09:51:13Z")

</div>

Hi @carson.zoom! Thanks for your help!  
I changed the payload to seconds

```auto
{
   "appKey": "",
   "iat": 1597312020,
   "exp": 1597916853,
   "tokenExp": 1597916853
  }

```

but the issue is still there. It doesn’t login

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 14, 2020, 4:40am UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/4 "2020-08-14T04:40:05Z")

</div>

Hi @iMykola,

Thanks for the payload. Please try to limit the `exp` and the `tokenExp` to be within 2 days from the `iat` time.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![iMykola](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imykola/32/13259_2.png) [@iMykola](https://devforum.zoom.us/u/iMykola)\
**Post date:** [August 14, 2020, 10:30am UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/5 "2020-08-14T10:30:24Z")

</div>

Hi @carson.zoom  
Set the `exp` and `tokenExp` to 1 day from `iat` but it doesn’t help

```auto
{
   "appKey": "",
   "iat": 1597400684,
   "exp": 1597487113,
   "tokenExp": 1597487113
  }

```

I use [https://jwt.io/](https://jwt.io/) for a token generation

Thanks

---

<div class="post-metadata">

**Author:** ![iMykola](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imykola/32/13259_2.png) [@iMykola](https://devforum.zoom.us/u/iMykola)\
**Post date:** [August 14, 2020, 10:41am UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/6 "2020-08-14T10:41:53Z")

</div>

I found and issue.  
I didn’t put correct SDK secret when generated JWT token on [https://jwt.io/](https://jwt.io/) 🤦‍♂️  
My bad

Thank you @carson.zoom for your patience and support.  
Kind regards

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 14, 2020, 11:33pm UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/7 "2020-08-14T23:33:36Z")

</div>

Glad to hear that! Then I will go ahead and close this thread. Please feel free to create another post if any other questions. 🙂

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 14, 2020, 11:33pm UTC](https://devforum.zoom.us/t/demo-app-authorization-does-nothing/26961/8 "2020-08-14T23:33:41Z")

</div>


