Frappe open day presentation from February 2013 discussed several updates:
1. The software was renamed from "Frappe" to "ERPNext" everywhere, though the rename was not fully completed.
2. The user interface was updated with a new login page, module layout, and website sitemap.
3. An API was introduced to allow accessing resources and methods via REST calls.
4. Work continued on the Frappe.io portal and syncing web pages from static files in markdown and HTML formats. Upcoming plans included improved documentation, breaking ERPNext into separate apps, and releasing the Frappe.io portal.
27. No need to remember
one more password.
Use your Facebook, Google or GitHub accounts to login.
28. Why not Twitter?
Twitter is being the dark knight
by not providing a user’s email address.
We found it unreasonable to create
a separate flow for twitter login.
29. And LinkedIn?
I don’t use LinkedIn. So,
I wasn’t motivated enough to do it.
If need arises,
it is just a few minutes of coding.
30. Our thanks to rAuth
for making oAuth so easy
[github.com/litl/rauth]
34. Getting keys for social logins
•
Signup for a developer account with Facebook,
Google or GitHub.
•
Create an APP in their console.
•
Specify APP name, Originating URL and callback
URL.
•
Copy the Client ID and Client Secret into frappe:
Setup >> System >> Social Login Keys
35. Facebook
•
Login to [developers.facebook.com] and
Go to Apps (it’s in the topbar) >> New App
•
Go to Settings >> Advanced
and find the field ‘Valid OAuth redirect
URIs’
•
Valid OAuth redirect URIs:
https://example.frappecloud.com/api/method/
frappe.templates.pages.login.login_via_facebook
•
After saving changes, go to Settings >>
Basic, click on App Secret’s Show button
•
Copy the App ID and App Secret into
frappe: Setup >> System >> Social Login
Keys
36. Google
•
Login to
[console.developers.google.com]
and Create a Project
•
Go to APIs & auth (it’s in the sidebar) >>
Credentials >> Create New Client ID
•
Authorized Redirect URI:
https://example.frappecloud.com/api/method/
frappe.templates.pages.login.login_via_google
•
Copy the Client ID and Client Secret
into frappe:
Setup >> System >> Social Login
Keys
37. GitHub
•
Login to
[https://github.com/settings/
applications/new]
•
Homepage URL:
https://example.frappecloud.com/
•
Authorization callback URL:
https://example.frappecloud.com/api/method/
frappe.templates.pages.login.login_via_github
•
Copy the Client ID and Client
Secret into frappe:
Setup >> System >> Social Login
Keys
48. REST
1. List
/api/resource/[resource_type] > List of resources
GET
!
/api/resource/Customer
/api/resource/Customer?limit_page_length=500
/api/resource/Customer?
filters={“customer_group”:”Retail”}
2. Get Doc (GET)
/api/resource/[resource_type]/[resource_name]
GET
!
/api/resource/Customer/Asian Fusion
50. API: Methods
Calling a method
/api/method/[method_name]?parameters
Without Commit
GET
/api/method/login
With Commit (Write)
POST
/api/method/login
Note: Method must be whitelisted