server side account check - is user registered (backand.com) - angularjs

i currently stuck on building an account check like whatsapp.
When a user clicks on his smartphone on his/her contacts, it should display, which user has an existing account.
So in theory it should post all user contacts to server, server checks if there is an account with this email adresse and sends the "updated list" back to the client.
Sounds easy, but how do i do something like that :)
Getting the contacts is working, also posting contacts to server.
I had my backend on backand.com and building an app with Ionic/Angular.

This should be very simple.
The core functionality here is based on Backand built in 'users' object, it holds all users you've added to your app, a simple GET to this object will return all your users details including emails.
Now you can add a serverside js action that
gets the contacts details from the client-side app in the request body (as JSON)
does an $http call to the users object ro fetch exiting users.
loops the contacts and search for them in the users array

Related

how to send "order is confirmed emails to customer" in django

I am trying to make an e-commerce website in Django and react. but I am not able to find a way for this scenario.
whenever a user purchases something a confirmation email should go to the user and one to the admin that a user buy something.
can we do this just by code or we have to use something like Mailchimp?i want to do it by writing code.
You don't need a service like Mailchimp for this. You need to write your own code for sending emails.
To send emails in Django you need to configure a mail server. You can use your own mail server or use providers like AWS SES (Simple Email Service) or SendGrid.
Then you need to write the code that will send two emails after the purchase. Ideally, it should be done in the webhook that will wait for payment confirmation from your payment provider (for example Stripe).
BTW, I'm working on Django+React tutorials at SaaSitive and just committed example code how to send activation emails (after registration) https://github.com/saasitive/django-react-boilerplate

Send an email when records are added to Firebase database

I would like to send an email to the signed user with the data that was added by the user to the Firebase database. I am using AngularJS UI. Is there are Firebase module which will trigger email with the data being added to the signed user.
Thanks, Rajesh
You should look into Cloud Functions for Firebase. This will let you write database triggers that run on Google servers that can act whenever data in your database changes. There is plenty of sample code the illustrates some of the many things you can do, including one specific example that shows how to send email in response to a change in the database.

How to activate company accounts through email after creating the company. RAILS

so this is my first question here in stackoverflow, i always find the answer by looking here... so.
I have this issue, I have a Model named Company, which can have many users, which would be the "best approach" to create and activate a user account within this newly created Company.
Here is the process i am following:
Platform Admin creates a company, the company serves as a grouping account in which i will have a number of users, but i need to send an Email after company creation to the Company admin in order to have him create his account so that he can manage the other company users, this email needs to have a hash so that it has some kind of reference to the company (avoiding the company selection in the form).
Im using Rails 4.2.6 and Angular 1.5
so im stuck after the company creation form.
In an email send the angular route url which got the company hash that just created. When admin user clicks on that link your angular route gets called and then before it render the view , i mean use resolve in angularjs route, get the list of all the user and company that just got created where admin user can select user that he or she want to activate.

Logging in an Angular + WebAPI app?

I have an Angular app that uses a WEB API service for data.
I want to log basically everything in a separated table in the database. Things like:
User x logged in on 2016-03-13
User x created a new product on xx
User x updated their profile
etc.
Basically every action, the user makes, I want to log.
The app is a fairly simple app, where the user has to login to do anything. Once logged in, they can create a couple of different items, edit them and delete some of them again.
So, my question is: how do I make such a log functionality? If I could get info like IP also, with each request, that would be great.
Any ideas?
Also, can it log when there occurs javascript exceptions? Like elmah for ASP.NET?

Facebook Taggable Friends

I am trying to get all the friends of the user currently signed in. I tried /me/friends but that didn't work as it returns only the users using my app already. I then tried https://graph.facebook.com/me/taggable_friends?access_token=somecodehere
In the browser it says
"To use taggable_friends on behalf of people who are not admins,
developers and testers of your app, your use of this endpoint must be
reviewed and approved by Facebook. To submit this feature for review
please read our documentation on reviewable features:
https://developers.facebook.com/docs/apps/review"
But when I do a GET (using Angular.js) on this URL with a valid access token using my application, it returns me a list of my friends, with their id, name, picture. Why is this happening? How can my app get the data if my browser cannot?
Also, the picture currently returned is too small. How can I get the email and larger picture of all my friends in this response?
Any help is highly appreciated.
PS: I am building a cordova app and getting access_token via CordovaOAuth.
taggable_friends works for you because it works without review for everyone with a role in the App (Admin/Developer/Tester). You only need to go through the review process if you want to go public with your App.
That beind said, taggable_friends is for tagging only, a larger picture is not neccessary for that and you definitely canĀ“t get their email. What would you do with the email of friends who did not even authorized your App? You would not be allowed to use those emails anyway. You can ONLY get the email of a Facebook user by authorizing that user with the email permission.
More information about getting access to friends: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

Resources