Fork me on GitHub
Ahmed Hassan03:07:17

What authentication and authorization workflow do you use in re-frame SPA?


Probably it depends. For example in the serverless app on AWS I'm writing, I did use AWS Amplify to take care of auth. It integrates nincely with AWS Cognito and I could pretty easily consume it from cljs (I use shadow-cljs, not sure if it's that simple with figwheel).


I do the same and we authenticate and register users via self reg / openID / SAML so Cognito system is pretty flexible. Another nice thing about the Cognito / AWS ecosystem - API gateway has fantastic integration with it and makes it pretty easy for you to power individual functions (lambdas) authorized by Cognito. From a BE perspective it doesn’t really matter, they have SDKs for a ton of languages and you don’t have to run 100% within the AWS ecosystem. As for the front end piece - the build tools really shouldn’t matter (other than it may be easier right now to add the AWS js sdk via shadow) but I personally use figwheel. Another option I’ve explored in the past was Firebase - probably a little more developer friendly but I had some pricing concerns 3 years ago with it. Honestly I couldn’t tell you anything about it today other than it appears to have gained traction.