MarkEdmondson1234 / markedmondson.me-hugo

Files for the website
0 stars 2 forks source link

datascience-aas/ #9

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

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/

dcaud commented 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?

MarkEdmondson1234 commented 3 years ago

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.

dcaud commented 3 years ago

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.

dedi0003 commented 2 years ago

Thank you for the info. Really nice to know that we can add payment functionality into our shiny apps.