Commit graph

42 commits

Author SHA1 Message Date
Akhil Narang
27970539af
fix(oauth2): introspect_token requires token (#35647)
https://datatracker.ietf.org/doc/html/rfc7662#section-2

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2026-01-05 13:41:12 +00:00
Akhil Narang
6ca4d4d167
refactor(treewide): ruff format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-09-26 13:16:43 +05:30
18alantom
c4f2335f11
fix: support public client 2025-07-04 15:05:50 +05:30
18alantom
db4a7504e5
fix: add hooks to handle cors 2025-07-04 13:18:43 +05:30
18alantom
e76c1830e1
chore: add global flag for Social Login Key 2025-07-04 11:25:06 +05:30
Alan
c174e9cbdc
fix: apply fixes on accepted Copilot suggestions
Update frappe/integrations/oauth2.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update frappe/integrations/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update frappe/integrations/utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update frappe/integrations/utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-03 15:01:47 +05:30
18alantom
5ca8ad9d84
refactor: deprecate OAuth Provider Settings
OAuth Settings has its fields now (only one)
2025-07-03 14:07:38 +05:30
18alantom
1215afdf96
feat(OAuth2): support RFC 9728
adds OAuth Settings to configure settings pertaining to Frappe used as
an OAuth auth server and resource server
2025-07-03 13:20:52 +05:30
18alantom
4cd8115c4c
refactor: unify how .well-known routes are handled 2025-07-02 15:17:42 +05:30
18alantom
3a47801598
feat(OAuth2): support RFC 7591
This allows a client to be registered without manual intervention.
2025-07-02 13:01:37 +05:30
18alantom
f8425b6520
feat(OAuth2): support RFC 8414
This allows an OAuth client to get metadata about the auth server, i.e.
the frappe bench being used as an OAuth2 auth server.

Metadata includes values for auth server urls and endpoints and
supported types and modes.
2025-07-01 13:40:18 +05:30
Ankush Menat
4116a33560
perf: speed up oauth bearer token query (#29184)
* perf: index user and make not_nullable

* refactor: simpler expiry setting

* perf: don't fetch all tokens
2025-01-15 13:24:46 +00:00
Rushabh Mehta
cef8c12ee4 fix(style): fix oauth authorisation page and standardise error responses 2024-10-24 15:21:34 +05:30
Corentin Forler
7360e3aa3d
fix: Use frappe._ 2024-10-16 21:07:57 +02:00
Corentin Forler
78fbd39b2a
fix: Translate OAuth confirmation details 2024-10-16 12:32:49 +02:00
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Shariq Ansari
9902f36812 fix: show full name instead of first/last name 2023-07-27 13:22:38 +05:30
Shariq Ansari
264372a2a3 fix: show list of user details that we are giving access to if scope is openid 2023-07-18 20:53:31 +05:30
Shariq Ansari
cbe9ec26bd fix: do not show Home primary button 2023-07-17 15:48:30 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Nabin Hait
6d7a852351 Merge branch 'version-13' into develop 2021-05-17 11:21:46 +05:30
Revant Nandgaonkar
0fb703ae9d fix: sider issues
(cherry picked from commit 72fbcac70c)
2021-04-29 14:14:30 +00:00
Revant Nandgaonkar
f7fb2809f4 test: oauth2 pkce and openid
(cherry picked from commit bb483d59af)
2021-04-29 14:14:30 +00:00
Revant Nandgaonkar
dfd5651dbe refactor: improve oauthlib implementation
implement openid provider
implement PKCE
improve errors

(cherry picked from commit 96d6971ee4)
2021-04-29 14:14:30 +00:00
Rohan Bansal
dade7ed216 refactor: fix py3 datatypes and remove references to six in oauth 2021-04-28 14:02:23 +05:30
Revant Nandgaonkar
936934b813 fix: id_token format
decode bytes to utf-8 string
2021-04-27 14:54:35 +05:30
Revant Nandgaonkar
72fbcac70c fix: sider issues 2021-04-26 23:04:43 +05:30
Revant Nandgaonkar
bb483d59af test: oauth2 pkce and openid 2021-04-26 22:56:14 +05:30
Revant Nandgaonkar
96d6971ee4 refactor: improve oauthlib implementation
implement openid provider
implement PKCE
improve errors
2021-04-26 22:56:14 +05:30
Revant Nandgaonkar
46d68e252f fix: id_token format
decode bytes to utf-8 string
2021-04-19 20:01:52 +05:30
Revant Nandgaonkar
3d26f84d33 fix(integrations): fix base url for openid_profile
if the server is behind proxy the frappe.request.url scheme
is http instead of https causing mixed content errors in browser
2021-02-24 12:31:34 +05:30
Raffael Meyer
af0d2085d4
Merge branch 'develop' into generic_oauth_client 2020-11-23 12:25:40 +01:00
barredterra
e93a38f912 refactor: move encode_params from test to oauth2.py 2020-11-20 19:02:33 +01:00
barredterra
bea4f6e11b fix: remove unused import 2020-11-20 18:03:17 +01:00
barredterra
9fb635828f refactor: oauth2 2020-11-20 17:44:35 +01:00
barredterra
f017cfa12d refactor(oauth2): better name and docstring 2020-08-13 19:35:52 +02:00
Revant Nandgaonkar
f4a254d0f7 py3-ready encode returns bytes 2018-03-19 23:11:46 +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
e324406c8a Import six.moves.urllib.parse.urlencode instead of urllib.urlencode 2017-08-11 00:38:26 +05:30
Aditya Hase
375dfd601d Replaced urlparse imports with six.moves.urllib.parse (#3847) 2017-08-03 11:43:28 +05:30
Aditya Hase
9d7d384a63 Replaced urllib.quote imports with six.moves.urllib.parse.quote (#3837) 2017-08-02 17:09:16 +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
Renamed from frappe/integration_broker/oauth2.py (Browse further)