How to generate a user referral link in lumen - lumen

I am new to Laravel Lumen and I would like to create a referral link api for my project.
I would like to know is it possible to generate a referral link when an user register an account in lumen ?
After the users registered they can share the referral to their friends/family and whoever clicked on the link it will send them to register.

Related

Firebase get Provider Tokens

I am using Firebase for my app. I can successfully authenticate users with facebook and twitter providers. I have added the linking the user accounts. Now a user can authenticate with email and then connect the facebook and twitter providers. But I have a problem in this case.
The scenario is, the user signed in with email. Connect twitter and facebook accounts to original account. Then, try to send a tweet. Right there, twitter login page opens. The user did not know the twitter tokens for twitter provider. I need to get custom tokens from the firebase for facebook and twitter. This way its meaningful to link providers. How can I do that?

Linking a website account to a facebook account so the user can post from the website anytime

I'm using the javascript API to link a website account to a users facebook account but I'm not sure if I'm doing it the best/easiest way.
I've created a facebook app
Used the FB.ui feed option to allow the user to post to their timeline
This works fine but the ui will ask the user to login each time they start a new session on the website. Have I missed something? Do I need to store and use the User Access Token?

Use OAuthWebSecurity With MVC 3.0 with custom membership provider

I am looking for how can I implement OAuthWebSecurity with Mvc 3
I have a custom membership provider and I would like to add Facebook, Google and Twitter authentication to my website.
Authentication scenario using Facebook for example
1- the user chooses login using Facebook.
2- check Facebook authentication
3- if success --> check if the user exist in my database
4- if exist --> make the user logged in, if not create a new user in my custom user table
Please advice.
Please See Below Link It Give you Fully Information about it
http://www.asp.net/mvc/tutorials/security/using-oauth-providers-with-mvc
Here is a sample / template project which implements a custom membership provider based on the Entity Framework, it has custom DB schema, external login / signup functionality via Google, Twitter, Facebook...
https://github.com/kriasoft/site-sdk

Facebook login authorisation for my website

I am building a website in PHP that has a log in section. For this I have a table in a MySQL database that stores 64bit hashed passwords and the users details. When a user enters their email and password the site hashes the password and compares it with the stored hash. To set up an account the user must register.
I want to integrate Facebook log in so users don't have to go through registration and can just log in to the password protected section of my site using their Facebook account. Which incidentally is exactly how I logged into stackoverflow just now. I have been researching this but can't find any up to date tutorials on how to do this.
Can some one please enlighten me as to how I can integrate Facebook log in to authenticate users to the protected part of my website?
Does my database need to provide a table for Facebook registered users? Do I enter facebook users details into my database at all?
I'd recommend looking into JanRain if you don't want to write something from scratch. http://janrain.com/products/engage/social-login/
They provide free (for less than 2500 users) single signon that integrates with all major services like Twitter, FB, Google, Yahoo, etc. very straightforward to implement as well.
You can start through the developer page of Facebook itself. See the Facebook Login
Check this link.
Login to website using Facebook account
We can handle this from server side as well as client side. in the above mentioned link you will find the solution to do this using javascript.
Some steps
Browse this link https://developers.facebook.com
Click on apps tab. >> It will promt you for login.
Once you are logged in >>
you can create an new app in your account.
Click on settings
tab(from left pannel) >> then click on "advanced" tab on the right
window.
Under "Valid OAuth redirect URIs" >> enter proper url
(for testing you can enter your -localhost url also, something
like localhost.com:98 etc) if you are using iis you can configure the
port number there. -if required you will have to put this url in
your host file as well.
From the dashboard tab you can get the app id and secrect key for the newly created app.(we will need this in
later stage).

Using facebook login authentication to access the website

In stead of website build-in login form, I use Facebook login to get user authentication, then they can browse all other page on my website.
My question is how to store user permission so that in all page, my website recognize that the current user is a authenticated user?
Is there any function in Facebook SDK provided these feature or I should use basic PHP function?
Thanks
The SDK itself doesnt offer you such a method to store the data. You have to do this by your own. There is own programmed component that can manage such for you. It stores the access_token for the users in a database. This can directly done via ajax. You can request for users permissions and store the data in the database...in one step!
Have a look at http://www.facebook.com/pages/Helper-Component-Community/222933037808340?sk=app_412923142052609