Register users with magic link in firebase? - firebase

I'm working on a product being targeted to companies with employees. We get a collection of employee emails to which we need to register them for an account on our firebase platform.
Ideally what I'd like to do is use this data to create all the user accounts on firebase then email them all a unique magic key to verify their registration and let them input a password.
Unfortunately I'm a bit stuck on making the magic link custom tailored to the users email. Looking at firebases dynamic link creator it doesn't look like there's a way to create a dynamic magic link where I can input something unique about the user account to later identify them after they click on it to give them the correct onboarding platform.
Any ideas how I could accomplish this?

You can create tailored Firebase Dynamic Links for each of your users. If you creating links server side, check out REST API https://firebase.google.com/docs/dynamic-links/rest .
For example in this long dynamic link https://abc123.app.goo.gl/?link=https://example.com/&apn=com.example.android&ibi=com.example.ios the deep link is https://example.com/. You can use deep link looking like https://example.com/invite_user?user_id=<here unique user id>.
You may need to check out Firebase Authentication https://firebase.google.com/docs/auth/ as well. Better to create separate question for each step you seeking advise.

Related

create unique and editable profiles

I am working on a web development project that will require keeping records for around 3-4,000 companies. If possible I want to use a wordpress plugin that enables a user to CREATE a unique user account / profile and update their profile with their up to date information at a later date. I tested profile builder but it wont let non admins initiate a new account (something I dont want to do 4,000 times).
Information also needs to be searchable (income range, location, etc.). This is not necessarily a deal breaker as I could develop a second app to search the DB.
Right now I am trying to choose between building a app where a user can create an account and interact with a UI (time consuming). I hate to ask such silly question but I am not having much luck.
Approximate wireframe:
Enable user registration and dispatch the 4 thousand emails inviting to open an account.
The default User Profile system remains as it is, just basic user info (it's easy to remove stuff from that page and give it a nice style).
Create a Custom Post Type for the big profile with all the searchable capabilities this offers.
Limit the number of posts the user can manage to One.
Ask new questions as the specifics arise.

DotNetNuke Cart

Does anyone with DotNetNuke have experience with downloadable content with a shopping cart?
There is a client using CatalooK as their shopping cart. They sell user manuals for a range of car models (one car has multiple user manuals in different languages) but did some test and this is we found so far:
If we have all the downloadable manuals users in the ‘All Users’ role will have access to all the downloadable content by anyone
When a user registers (either from the Login page, or through purchasing a product from the cart), a user account is automatically created for them and are assigned the role as ‘Registered Users’. This solves the problem of having all users access to the content – can just change the permission for the downloadable items to only display for 'Registered User' only
However, anyone can register themselves on the website and automatically be assigned a ‘Registered Users’ role, therefore getting access to the manuals without having paid for them
A step further would be to require the manual adding of user accounts to a new role called ‘Downloads’ which would be the only users within the 'Downloads’ role to have access to the downloadable manuals
Problem here is, if a user purchases 1 downloadable item and they are added to the ‘Downloads’ role, they will also be given access to all of the other downloadable manuals – as they are in the same role
So I guess the workable solution would be to create a new role for every car model to allow people in each car model role access to the downloads – which would also mean manually adding the role of every group purchased to that user’s accounts.
Anyone have any experience or alternatives to this to make it more automated and secure?
Basically no body has access to the downloads unless you have purchased the products.
Upon purchasing some shopping carts send you an email with a unique link to the downloadable so they can access it that way. In your situation you also want them to be able to see the documents on the site at anytime after purchasing them, which makes sense.
Catalook has a 'Your Orders' module, does that show you the document or electronic item you purchased? That might be an option.
But worst case, I guess you can implement your 1 role per product. Sounds like a lot of work though! Or, do some custom :]coding.
Based on your situation the cart I use the most DNNspot (mine) - it would be similar to Catalook. Where you would need to create a role per product. Or use the orders module to show your previous orders which would link to your document you bought.
How good is your SQL? You could use the core DNN 'reports module' If you analyze the database and orders table - with a little bit of SQL you could setup a custom Report and maybe solve this.
This is very interesting an challenging. probably, this is not supported by catalook store module by default. If you are looking to implement a new simple module, there are some simple solutions to this.
Using personalization: you can use dnn's personalization provider to store user products. initially empty, and as user purchases the products, you can add comma separated list of productid to maintain it smartly. check that values back to validate downloads
Using custom user profile property and use it in same way as [1] above
Email option suggested by #Ryan is good option when you want to allow users to download manually only via email links. But again, you will still need to validate if a user is allowed to download that product or not that you can achieve via the above suggestions.
Let me know if you need more help with this, I have good experience to deal with catalook specific small modules for such extensions.
Happy coding

Filtering Repeater items based on user status/role

I have a tricky requirement where I need to categorise documents attached to a product, available for download, based on the status of the user viewing the product. I.e. my site displays a list of products, clicking on one displays a product details page, and this page includes a list a documents related to the product, such as data sheets, user manuals, etc.
I have been asked to group documents into three classes of availability, v.i.z. those available freely to all users, including anonymous; those available to logged on users; and those available to anonymous users that provide contact information before downloading the document, presumably to boost sales leads.
The anonymous and logged on availabilities are quite easy, but the third seems a bit tricky to me. My first question is, is there a way I can filter documents for only logged on users without hooking into ItemDataBound or something, and my second question is, what is recommended for the case where a user must supply contact information to download a document?
In the second question, it has crossed my mind to actually register the user, but without them having to visit the new user registration page, and then I have role based filtering of documents. Currently the new user registration process automatically adds the Member role to all new users. Users I register 'quietly', just so they can download a document, wont be assigned the Member role, distinguishing them from normally logged on members. What other approaches could I take?
A lot of this implementation will depend on exactly what you want to accomplish and how you go about doing it.
For example, if I don't have access to the document, should I see the link?
If your implementation is that all users should be able to see it, but that the actual act of 'getting it' is dependent upon the individual role or membership, you could solve it fairly easy by implementing a "handler" to download the secured documents, that way you are not presenting a direct file link. That handler could then validate security, if they were not allowed, it could then take them to the login or register page as needed.
If the users don't see the documents until they meet the requirement, I would then filter BEFORE you bind to your repeater.

Relationships via Email Rather Than User List

I'm new at Drupal, so I may have missed a solution despite a lot of research: I want users to be able to invite non-users and other users into a named relationship they've set up (using e.g. the Friendlist or User Relationships module) using only email addresses and not the user list. I believe that invitations from both of those modules are done only after the inviter selects the invitee after selecting the invitee from a list of all users. Frankly, I would be surprised if no email solution exists since a large site's user list would be daunting. Does anyone know if this is possible using Organic Groups? Thanks very much.
You can use the Invite module at http://drupal.org/project/invite and turn on the User Relationships Invite plugin. Now, you will have a Relationship field in your invite form and you can invite by email.

Shutterfly Order API .

I found this site
http://www.shutterfly.com/documentation/api_OrderImage.sfly
but there are no examples of actually walking through the whole process. Does anyone have any good documentation on using this API to take a local photo and allow someone to order a print via shutterfly?
I went through these steps:
Sign up for an account
Sign up as a developer
Create an application (I called mine Test). Note the generated Application Id and Shared Secret
The Shutterfly API page has a list of references for various Domain-specific APIs:
Address Book
Album Data
Folder Data
Go To Shutterfly UE
Image Upload
Interactive Sign-in
Image Request
Order
Pricing
Seamless Sign-in
User Data
User Authentication
Each uses RESTful principles. The documentation looks pretty comprehensive to me, if you need some background, here's links for RESTful APIs and ROME you may find useful
There is also an API Explorer section on the same page that allows you to test the methods via a form on their site. For example this form for CRUD operations on the album data.
Based on your comment, for your requirements, you would:
Use the Album GET to list albums, then get the data for a specific album.
Use the Image Get request to retrieve the image data, so your friend can verify the image(s) they want to purchase.
Authenticate the user
Use the Pricing POST request to get the estimated pricing for the image.
User the Order POST to submit the order over https
Update: Found a page describing using a Greasemonkey script which adds Shutterfly print ordering capability to Flickr. This might provide the basis for a solution.
For Reference:
The original link above is a middle step of the Shutterfly Open API ordering procedure.
The whole process goes through a series of steps allowing you to control much more than just pushing photos into somebody's album in Shutterfly.
With this process, your application can actually carry out the entire procedure of:
specifying the images and the sizes and quantities, or other products
calculating shipping, taxes, and totals
paying, and
launching the processing
It also includes the ability to see when the packages will be delivered and arrive.
Thus if you have a solid application for mapping your images onto paper and products, you can pretty much control the entire process.
Once the order is submitted, it will appear on the user's account at Shutterfly who the order was associated with.
Kudos to Shutterfly for making such a powerful tool! It would be great if other printing facilities had similar tools.

Resources