Open utterances-bot opened 3 years ago
Hi again, Mark. To continue a prior conversation about users needing to re-login (via firebase) after a successful payment, I wonder whether 1) sending a custom success parameter in your pdle_subscribe function with something like shinyapp.url/userid=12345; 2) having the shiny app parse the incoming url for the userid; 3) sending that userid to firebase so that it auto-logs in. Maybe something random but associated with the userid would be better for security, but either way, #3 is where I'm currently stumped. Any ideas on how to do #3?
The Firebase login could maybe also drop a cookie which would auto-login on a user's second visit, would need to look at how the JavaScript library handles it. Once you have a Firebase UserId then you can check that in the Shiny app to see if its valid and if the user can see paid content - thats what the example app does.
Thanks! In general, there are some hard-to-handle things here in regards to javascript building the UI -- the javascript doesn't always work as intended in various typical Shiny UI elements (renderUI, modals, etc.). But thanks so much.
Thank you for the info. Really nice to know that we can add payment functionality into our shiny apps.
Online payments for data science apps (DSaaS) using R, Shiny, Firebase, Paddle and Google Cloud Functions · Mark Edmondson
A bootstrap example on how to create a paid data science app (DSaaS)
https://code.markedmondson.me/datascience-aas/