# Google cloud deployment of the OHIF viewer

**URL:** <https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246>\
**Category:** Support\
**Created:** [January 20, 2022, 5:40pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246 "2022-01-20T17:40:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepa](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/deepa/32/418_2.png) [@deepa](https://discourse.canceridc.dev/u/deepa)\
**Post date:** [January 20, 2022, 5:40pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/1 "2022-01-20T17:40:01Z")

</div>

Hi,

I’m currently working through this tutorial created by Andrey on google cloud deployment of the OHIF viewer: [Google Cloud deployment of OHIF Viewer - Google Docs](https://docs.google.com/document/d/1v4Syu_yOV6yH--QBLGzsL9fJ7-XyD1CnQu4iTIoPVD8/edit#heading=h.43a3r6qbdsiy)

However, in the last step of authorizing the OHIF viewer to access user information, when I try to open the hosting URL, I receive the authorization error:  
“Error 400: redirect\_uri\_mismatch. You can’t sign in to this app because it doesn’t comply with Google’s OAuth 2.0 policy. If you’re the app developer, register the redirect URI in the Google Cloud Console.”

Thank you,

Deepa

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/fedorov/32/3_2.png) [@fedorov](https://discourse.canceridc.dev/u/fedorov)\
**Post date:** [January 20, 2022, 5:55pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/2 "2022-01-20T17:55:41Z")

</div>

We looked into this together with Deepa, and confirmed that redirect URL is configured in the OAuth client ID settings correctly, and that the consent screen has the right domain. I can’t think of a reason why this error is showing up. Maybe @wlongabaugh or @pieper have any thoughts?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/pieper/32/10_2.png) [@pieper](https://discourse.canceridc.dev/u/pieper)\
**Post date:** [January 20, 2022, 11:44pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/3 "2022-01-20T23:44:48Z")

</div>

If you don’t have any luck we can compare the configuration with the [https://idc-sandbox-000.web.app/](https://idc-sandbox-000.web.app/) installation.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/fedorov/32/3_2.png) [@fedorov](https://discourse.canceridc.dev/u/fedorov)\
**Post date:** [January 20, 2022, 11:56pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/4 "2022-01-20T23:56:51Z")

</div>

I have a functioning deployment, we compared, and I can’t figure it out … Maybe we can get on a screenshare sometime next week to debug this together…

---

<div class="post-metadata">

**Author:** ![wlongabaugh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/wlongabaugh/32/34_2.png) [@wlongabaugh](https://discourse.canceridc.dev/u/wlongabaugh)\
**Post date:** [January 21, 2022, 12:54am UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/5 "2022-01-21T00:54:00Z")

</div>

I am a little surprised that `https://deepa-firebase.web.app/callback` appears to work? E.g. over in the sandbox, the callback is `https://idc-sandbox-000.web.app/callback`. But I really am ignorant on Firebase deployments. Again, screenshots of the error messages would be helpful to debug.

---

<div class="post-metadata">

**Author:** ![wlongabaugh](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/wlongabaugh/32/34_2.png) [@wlongabaugh](https://discourse.canceridc.dev/u/wlongabaugh)\
**Post date:** [January 21, 2022, 12:55am UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/6 "2022-01-21T00:55:29Z")

</div>

(But in sandbox-000, there are half a dozen callbacks, and I honestly don’t know which one is the golden one.)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/fedorov/32/3_2.png) [@fedorov](https://discourse.canceridc.dev/u/fedorov)\
**Post date:** [January 21, 2022, 10:22pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/7 "2022-01-21T22:22:00Z")

</div>

I think I might have found the culprit. Here’s the screenshot of the error:

 ![2022-01-21_17-17-06](https://us1.discourse-cdn.com/flex015/uploads/canceridc/original/1X/8e7f4f486502d6199600472d5ad0d5473b04769c.png)

I looked at the URL of the page displaying this error, and it ends with `?client_id=`, followed by what looks like the client ID, and that client ID was not the one that was supposed to be used by Deepa’s application. Instead, it was the ID I had in the previous revision of the [OHIF configuration Gist](https://gist.github.com/fedorov/737c7b76c7836b6d4de72f0fc1ce4eb5) I linked in the instructions (I now deleted that revision). Let’s see if Deepa can go over the steps again with better success, now using the correct client ID. Maybe this will help someone else, since it is not obvious how to get to the client ID used by the webapp.

---

<div class="post-metadata">

**Author:** ![kyounis](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/kyounis/32/144_2.png) [@kyounis](https://discourse.canceridc.dev/u/kyounis)\
**Post date:** [January 24, 2022, 6:26pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/8 "2022-01-24T18:26:55Z")

</div>

After posting the last comment, @fedorov and @deepa joined me on a call and we tested the implementation successfully

 ![OHIF Viewer](https://us1.discourse-cdn.com/flex015/uploads/canceridc/original/1X/cb79a1656d7576a3615ce1c0c188e82b549a445f.jpeg)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.canceridc.dev/fedorov/32/3_2.png) [@fedorov](https://discourse.canceridc.dev/u/fedorov)\
**Post date:** [January 24, 2022, 7:09pm UTC](https://discourse.canceridc.dev/t/google-cloud-deployment-of-the-ohif-viewer/246/9 "2022-01-24T19:09:25Z")

</div>

Thank you @kyounis! Deepa also confirmed today she was able to complete the tutorial. Thank you very much for testing of the tutorial and help in figuring out the details. I hope this tutorial is helpful to you and other users!
