• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 44095682917
86%
master: 76%

Build:
Build:
LAST BUILD BRANCH: release/2.026.43
DEFAULT BRANCH: master
Ran 17 Nov 2026 01:49PM UTC
Jobs 10
Files 892
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Nov 2026 01:44PM UTC coverage: 86.036% (+0.01%) from 86.022%
44095682917

push

github

web-flow
fix(auth): handle new SSO accounts race condition on first log in DEV-3097 (#7763)

### 📣 Summary
First-time single sign-on users whose accounts are created via SCIM will
now see a provisioning loading screen instead of an unexpected
registration form while their account setup completes.

### 📖 Description
When logging in through an organization's SSO provider for the first
time, automated account provisioning via SCIM can take a few seconds to
reach Kobo. Previously, arriving at Kobo before the SCIM creation
request finished would route users to a signup/registration form. Kobo
now holds the login session on a provisioning wait screen that polls for
the account creation, automatically completing the login once the
account is ready. This PR resolves the race condition between OIDC
callback completion and asynchronous SCIM `POST /api/v2/scim/v2/Users`
account provisioning:

- **Adapter Interception:** In
`SocialAccountAdapter.pre_social_login()`, first-time logins from
SCIM-enabled providers
(`social_app.scim_idps.filter(is_active=True).exists()`) are intercepted
before reaching allauth's signup view. The login state and start
timestamp are stashed in the session (`socialaccount_sociallogin`,
`scim_provisioning_start`), and the browser is redirected to
`/accounts/social/provisioning/`.
- **Signup Guard:** `SocialAccountAdapter.is_open_for_signup()` returns
`False` for SCIM-enabled providers to block manual registration forms.
- **Polling Endpoint:** Exposes `GET
/api/v2/social-accounts/provisioning/` (configured with `AllowAny` and
empty authentication classes). The endpoint:
- Returns `{"ready": false, "expired": false, "redirect_url": null}`
while waiting.
- Returns `{"ready": true, "expired": false, "redirect_url": "..."}`
once `sociallogin.lookup()` detects the SCIM-created `SocialAccount`,
completing authentication via `_login()` and clearing pending session
state.
- Returns `{"ready": false, "expired": true, "redirect_url": null}` if
no session e... (continued)

10968 of 13782 branches covered (79.58%)

45 of 90 new or added lines in 5 files covered. (50.0%)

1 existing line in 1 file now uncovered.

34294 of 39860 relevant lines covered (86.04%)

5.82 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
53.33
kobo/apps/kobo_scim/provisioning.py
17
59.4
24.21% kobo/apps/accounts/adapter.py

Coverage Regressions

Lines Coverage ∆ File
1
59.4
24.21% kobo/apps/accounts/adapter.py
Jobs
ID Job ID Ran Files Coverage
1 44095682917.1 17 Nov 2026 01:49PM UTC 887
54.44
2 44095682917.2 17 Nov 2026 01:49PM UTC 887
50.05
3 44095682917.3 17 Nov 2026 01:50PM UTC 890
66.58
4 44095682917.4 17 Nov 2026 01:50PM UTC 887
57.42
5 44095682917.5 17 Nov 2026 01:50PM UTC 889
55.77
6 44095682917.6 17 Nov 2026 01:51PM UTC 887
59.46
7 44095682917.7 17 Nov 2026 01:52PM UTC 889
51.41
8 44095682917.8 17 Nov 2026 01:52PM UTC 889
60.63
9 44095682917.9 17 Nov 2026 01:53PM UTC 889
59.0
10 44095682917.10 17 Nov 2026 01:56PM UTC 892
69.09
Source Files on build 44095682917
  • Tree
  • List 892
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • d06ad741 on github
  • Prev Build on main (#44083304538)
  • Next Build on main (#44097547713)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc