Is there a way to create Pusher App throught API call? - pusher

I'm developing a multi-tenant web application that uses pusher to send notifications, I need to have one app for each tenant, so I'd like to create a tenenat throught a command and automatically create a pusher app and store its keys
I couldn't find it in Pusher docs, is this an possible option?
What would be my alternatives?

That isn't possible at the moment. A possible workaround would be to create a number of apps in advance and then use these credentials as you create tenants.
Additionally, it is possible to create a multi-tenant approach using a single app in Channels. Private/Presence channels require user authentication before the subscription succeeds. This means you could create a channel private-tenant1 and only allow users from tenant1 to subscribe.
See https://pusher.com/docs/channels/using_channels/private-channels for more info.

Related

What is a good strategy to save user premium subscription for a web app with Azure AD B2C as user management system?

I am building a Blazor Server web app that will have locked features only accessible via paid subscription (payment handled with stripe).
I am using Azure AD B2C for user management/authentication.
I also have an Android and iOS app built with Xamarin, from which users will be able to subscribe to the service (payment handled with Android/iOS built-in payment service), and therefore have full access to the web app.
What is the right approach to save the fact that a user has completed payment, and retrieve that data on future sign up ?
I read about custom attributes in Azure AD B2C, so maybe I should build the system on top of Azure AD B2C, but I am not sure it is the appropriate approach for this use case.
Thanks in advance
Yes, you could use a custom policy and custom attributes if you have a simple system where you just want to store a value and deny access during login if the value is not set.
For anything more complicated, rather store all the details in a DB and access it via a REST API.
Update
You can access the attribute direct from custom policies. You just read and write it like any other attribute.
If you want to use the Graph API, be aware the name is different.

Simplest way to replace AD with ADFS (or add it on top it)?

I have a client app and it is a single-tenant app in AD. What I actually need is a collaboration between a couple of AD users in order to share our users (all users will eventually be used in 1 shared resource which is the blockchain workbench). I have come to realize that my use case requires ADFS. In every tutorial I encounter I see that it require setting up a lot of new servers. Isn't there a simple way to add the Federation services into my use case?

How to connect React.js/React Native Apps to one single backend instance of Azure App Service?

I'm planning to create 1) react.js web app 2) react Native android/ios apps, and I want to create one unified node.js backend to serve as a single API for both web and mobile apps.
I would also like to take advantage of Azure's notifications hub and authentication. For authentication, I'll also need to have custom username/pw rather than just social accounts. What should I do? Can AAD achieve it?
I realized whilst Azure has great support for native iOS/Android Apps, it's not entirely clear on whether it supports React/React Native Apps as well.
To what extent would the javascript mobile App SDK help?
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-html-how-to-use-client-library/
Thanks!
To provide single APIs for both web clients and devices, and implement Notification push, you can use Azure Mobile Apps in Node.js.
For authentication, I'll also need to have custom username/pw rather than just social accounts. What should I do? Can AAD achieve it?
If you want to custom authentication on your Mobile Apps, you can refer to https://shellmonger.com/2016/04/08/30-days-of-zumo-v2-azure-mobile-apps-day-5-custom-authentication/ for details. And to use AAD, you only can authentication your users in your tenant in AD. (the user name is inthe format:<username>#<tenant>.onmicrosoft.com).
At last, as React/React Native Apps are based on javascript, so you are right, you can implement the Mobile Apps functionalities with JavaScript Client Library for Azure Mobile Apps
Here is a post in the similar scenario with you, maybe it will help you.

Override CreateCredentials from SocialLoginProvider in azure app services

I want to store user information to a db after a user successfully logged in via a social provider (google, facebook, etc.) without calling an extra api on the client side.
In azure mobile services this is done by creating a class that inherity from e.g. GoogleLoginProvider and then by overwriting the CreateCredentials method.
See this post: Save information immediately after Google login in Azure Mobile Services (.NET Back-end)
But how can I archive the same behaviour in Azure App Services?
Thanks
Unfortunately this is not possible with App Service authentication. The authentication happens outside of your application and there aren't currently any direct hooks into the authentication pipeline. This also means you will not be able to inject custom claims into the ClaimsIdentity.
We are aware of some of these scenarios and want to try and address them, but don't have any timelines to share at this point. I believe the separate API call into the backend will be required in order for you to implement your registration. As far as implementing role-based access control, you will likely need to store the additional user metadata elsewhere.

Azure API Management - Subscription keys for Applications?

I've been playing around with API Management and it looks great. The only issue I have is that when calling an API you need to pass a subscription key, which is linked to a 'User'. In the majority of use cases the caller of our APIs are Applications (back-end services).
Am I supposed to be creating a User account per Application, or is there another way for me to obtain a security key for the App?
I have had a brief look at AD, however I don't want to go down that route straight away.
Thanks
You can create a single "API Consumer" user and use the key assigned to that user for all your back end services. Or you could create a separate user for each of your services. But creating a separate user you would have the ability to independently revoke access to certain services and control rate limiting/quotas independently.

Resources