
Manojit Ghosh • over 5 years ago
How can we use multiple callbacks?
Hi,
In my app, I have two types of users, for instance, user type a and user type b. I want to handle these two types through two different callbacks. In the developer portal, I can add the second callback url in the next line. What changes are required to be made in the app's code? For instance, in .env, there is one variable named GENOMELINK_CALLBACK_URL. Also, what changes are required to be made in the call to genomeLink.OAuth.authorizeUrl which only takes scope? I appreciate the cooperation of forum members.
Comments are closed.
1 comment
Kensuke Numakura Manager • over 5 years ago
Hi,
Thanks for your feedback. Though it is not documented, instead of using GENOMELINK_CALLBACK_URL env var, you can set `callback_url` string as optional parameter together with scope parameter in authorize_url() function:
python
https://github.com/AWAKENS-dev/genomelink-python/blob/7469911110daaa08558b6da19042e8cd38b06e68/genomelink/oauth.py#L13
node
https://github.com/AWAKENS-dev/genomelink-node/blob/9dadbee58f7b20d649010409b9ecfceab2cf8997/src/OAuth.js#L7
Hope this helps!