---
title: "Comment by Osinachi Chukwujama  on \"JWT authentication, The right way.\" | Hashnode"
description: "Nice article man. I have one question. What if I&#39;m building a payment service like Paystack and I need to allow a different users access my API? How can I e"
url: "https://hashnode.com/posts/jwt-authentication-the-right-way/62f2df91408d676b1b58b2fb/comment/62f3973e445b4c80c2b8bdc6"
---

[Discussion](https://hashnode.com/posts/jwt-authentication-the-right-way/62f2df91408d676b1b58b2fb)

Comment [JWT authentication, The right way.](https://hashnode.com/posts/jwt-authentication-the-right-way/62f2df91408d676b1b58b2fb)

[Osinachi Chukwujama](https://hashnode.com/@Vicradon)

[Aug 10, 2022](https://hashnode.com/posts/jwt-authentication-the-right-way/62f2df91408d676b1b58b2fb/comment/62f3973e445b4c80c2b8bdc6)

Nice article man. I have one question.

What if I'm building a payment service like Paystack and I need to allow a different users access my API? How can I enforce CORS in such a case?

[Vic okeke](https://hashnode.com/@vic3)

[Aug 10, 2022](https://hashnode.com/posts/jwt-authentication-the-right-way/62f2df91408d676b1b58b2fb/comment/62f3973e445b4c80c2b8bdc6#reply-62f39c1d8902bf81fe536b4d)

Yeah, you can request for their domains while they sign-up for your API, then store in a database, you then fetch all domains into an array/list is an accepted format in the cors origin option

[Amolo](https://hashnode.com/@amolo)

[Aug 10, 2022](https://hashnode.com/posts/jwt-authentication-the-right-way/62f2df91408d676b1b58b2fb/comment/62f3973e445b4c80c2b8bdc6#reply-62f4293631be20833796e0dc)

Additionally, such APIs don't restrict which "origin" calls them. You probably want to pass the JWT as a header or something in that line.
