Commit graph

13 commits

Author SHA1 Message Date
jibin jose
5cec97a0a2 Fix social login in Python3
In Pyhton3, requests response content is in bytes type. So decoder
have to handle both `str` and `bytes` to make it compatible with
both python 2 and 3
2019-04-05 16:41:25 +05:30
Roland
2a2e3ca0af fairlogin social ID provider (#6096)
* fairlogin

adding fairlogin provider

* fairlogin

add fairlogin provider

* fairlogin

* fairlogin

* fairlogin userid

fairlogin userid corrected to preferred_username

* removed trailing white space

* removed trailing white space

removing white space mourned by automated code review
2018-09-25 15:35:46 +05:30
Alchez
88c31d27e3 Fix tuple index bug in string formatting (#5632) 2018-06-01 12:13:27 +05:30
yogeshak
51f5988a76 JWT response does not contain email attribute for Office 365, reading upn instead (#5525) 2018-05-16 11:13:17 +05:30
Revant Nandgaonkar
5f22459013 Salesforce social login (#4819)
* Added Salesforce Social Login

* [Docs] Generate client_id client_secret for login providers

* [Fix] salesforce userid

Saleforce sub from openid is https://login.salesforce.com/id/ABC/XYZ
Extracting ABC/XYZ
2018-01-19 12:23:37 +05:30
Revant Nandgaonkar
02aa7b6f41 Social login refactor (#4519)
* Added DocType Social Login Key

WIP for https://github.com/frappe/frappe/issues/4496
added basic fields
after_insert add provider_username and provider_userid fields on User dt
on_trash deletes added fields on User dt

* Added field to store fontawesome icon for provider

* [Patch] Social Login Keys to Social Login Key

* [Patch] Social Login Keys to Social Login Key

* Social Login Key generates boilerplate

* patch fixed for social_login_refactor

* removed patch-not working

* use social login keys to initiate flow

* Login page shows Social Login Key

* show login via if base_url present

* removed boilerplate generator

* Multiple Changes

fix zxcvbn import in password_strength.py
use of child table instead of additional fields on user dt to store username and userid

* Fetched Template on Client JS

* Frappe social login template working

* Added Social Login Key Templates

* Codacy fixes and validate social login key urls

* [Patch] Social Login Keys (untested)

* [Fix] Patch refactor social login keys

* [Fix] Patch refactor_social_login_keys manually tested

* Refactor OAuth 2.0 related changes for Social Login Key

* [Fix] Patch refactor social login keys

* Test - Adding Frappe Social Login Key

* Social Login Key Tests

check added child table entry on user for provider frappe
it also checks if userid is created

* [WIP] Office 365 Social Login Key Template

* [Fix] Social Login - Redirect URL

* [Test] Single sign-on icons for added provider

* [Fix] Codacy Errors

* [Fix] Social Login Key Form JS

* Docs Added for Social Login Key

* [Fix] Patch Refactor Social Login Keys

* Handle different icon types

Handle different icon types (image, icon, emoji) with just icon field

* Move the login methods to a new py file

frappe.integrations.oauth2_logins added
copied whitelisted guest oauth2 redirect endpoints from login.py
removing the functions from login.py will break backward compatibility

* Social Login Key Form Changes

Moved Enable field to top
Fields which are not editable are collapsed

* [Fix] Codacy Errors

* Corrected Docs, sync.py

* [Docs] Adding a social login provider

* [Fix] set frappe userid from User Social Login

* [Fix] frappe userid in oauth.py

* removed icon_type

* Use frappe.utils.is_image
2018-01-03 14:57:16 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
Saurabh
7620bb3789 Deprecate Integration Broker (#2831)
* [fix] remove razorpay from integration service

* [fix] clean-up js side integration service dependancies

* [fix] remove integration service, .py cleanup, move integration request to integration

* [fix] move oauth to integrations and deprecate integration broker

* [fix] mark services enabled and update integrations listing

* [fix] V7.1 and V7.2 integration service related pathch fixes and move payment gateway dotype to core module

* [fix] create payment gateway records if not exists

* [fix] module page for integrations

* [minor][fix] minor checks

* [fix] remove integration broker module only if not allocated to any doctype
2017-03-14 11:24:26 +05:30
Rushabh Mehta
e984953a0a [fix] set frappe parameters only if frappe_server_url is set (#2274) 2016-11-08 09:48:38 +05:30
Revant Nandgaonkar
a16e6a143f OpenID Connect for Frappe (#2227)
* Add field for client_secret in Oauth Client Doctype

* openid_profile endpoint in oauth2.py

* added stub methods for OpenID Connect in RequestValidator

* [Fix] using werkzeug url_fix on uri

* added 3 oidc methods in RequestValidator

* Added Frappe Section in Social Login Keys

Add section in `Social Login Keys` for fields `Frappe Client ID` and `Frappe Client Secret` and additional field Frappe OAuth 2 Server because github, facebook and google have fixed urls, Frappe server URL can change as per the hosting domain/server/company

* [Fix] accept code id_token param for oidc

* generate id_token jwt alg HS256

* Updates to OAuth 2 and OIDC

`OAuth Authorization Code` and `OAuth Bearer Token` DocType made RO
Delete Invalid Codes and Revoked Tokens periodically
generate and send `id_token` only if scope of token is `openid`

* [Fix] Periodically delete revoked tokens

* Social Logins untested

* Enabled Frappe social login

* [Docs] OpenID Connect and Frappe social login

* [Fix] Allow multiple scopes for OAuth 2

* [Docs] Added screenshot steps to configure openid and frappe social login

* saved doctype to solve merge conflict

* [fix] re-added client_secret after resolving merge conlict

* [Fix] frappe_userid and default scope
2016-11-07 22:25:11 +05:30
Shreyas Patil
e5bb0bb283 [Fix] Social login not allowed for a disabled user (#2032) 2016-09-12 16:06:35 +05:30
Rushabh Mehta
0cb31006e5 [redesign] website route is evaluated on request, no cold start 2016-06-23 12:23:37 +05:30
Anand Doshi
293a8136cb [fix] facebook oauth, login using token. Fixes frappe/erpnext#4166 2015-12-24 20:37:45 +05:30