Skip to content

feat: Add QQ authentication helpers#469

Open
kaziiza wants to merge 1 commit into
parse-community:mainfrom
kaziiza:codex/parse-qq-auth
Open

feat: Add QQ authentication helpers#469
kaziiza wants to merge 1 commit into
parse-community:mainfrom
kaziiza:codex/parse-qq-auth

Conversation

@kaziiza

@kaziiza kaziiza commented May 12, 2026

Copy link
Copy Markdown

New Pull Request Checklist

Issue Description

Refs #55

Adds ParseSwift client helpers for Parse Server's QQ authentication adapter.

Approach

  • Add a new ParseQQ wrapper with auth type qq.
  • Support secure code + redirect_uri authData and deprecated id + access_token compatibility.
  • Add callback, async/await, and Combine login/link helpers.
  • Add unit coverage for key generation, validation, login/link/unlink, invalid authData, and Combine helpers.

TODOs before merging

None.

Testing

  • git diff --check -- ParseSwift.xcodeproj/project.pbxproj
  • Static checks for PBX duplicate definitions, brace/paren balance, registration counts, trailing whitespace, and line lengths
  • swift build
  • swift test --enable-code-coverage --filter ParseQQ passed: 18 tests, 0 failures.

@parse-github-assistant

parse-github-assistant Bot commented May 12, 2026

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request adds QQ third-party authentication to the ParseSwift framework. It introduces a new ParseQQ authentication handler with callback-based APIs for secure OAuth (code/redirectURI) and deprecated insecure (id/accessToken) login and link flows, along with async/await and Combine publisher variants. The implementation is integrated into the Xcode build system across all supported platforms (iOS, macOS, tvOS, watchOS), and comprehensive test coverage validates all API surfaces.

Changes

QQ Authentication Integration

Layer / File(s) Summary
Project structure and file references
ParseSwift.xcodeproj/project.pbxproj
Xcode project configuration updated to register ParseQQ source files (ParseQQ.swift, ParseQQ+async.swift, ParseQQ+combine.swift) and test files as build inputs; framework and test targets across iOS, macOS, tvOS, and watchOS are wired to include the new files in their build phases.
Core QQ authentication implementation
Sources/ParseSwift/Authentication/3rd Party/ParseQQ/ParseQQ.swift
ParseQQ<AuthenticatedUser> struct implements ParseAuthentication with callback-based login(code:redirectURI:) and deprecated login(id:accessToken:) methods; link() variants mirror login flows; AuthenticationKeys enum validates and constructs authData payloads; ParseUser extended with qq computed properties.
Async/await API surface
Sources/ParseSwift/Authentication/3rd Party/ParseQQ/ParseQQ+async.swift
Conditional async/await extensions (Swift 5.5.2+, _Concurrency) bridge callback-based login and link methods via withCheckedThrowingContinuation, providing concurrent APIs for code/redirectURI, deprecated id/accessToken, and direct authData variants.
Combine publisher API surface
Sources/ParseSwift/Authentication/3rd Party/ParseQQ/ParseQQ+combine.swift
Conditional Combine-based extensions (when Combine available) provide loginPublisher and linkPublisher methods returning Future<AuthenticatedUser, ParseError>, wrapping callback APIs for code/redirectURI, deprecated id/accessToken, and direct authData variants.
Callback, async, and Combine test suites
Tests/ParseSwiftTests/ParseQQTests.swift, Tests/ParseSwiftTests/ParseQQCombineTests.swift
ParseQQTests validates callback and async/await login, link, unlink, and error handling; ParseQQCombineTests validates the same flows using Combine publishers; both include mock server setup, keychain/storage cleanup, and assertions for authentication state transitions, user field updates, and provider-linked/unlinked status.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title 'feat: Add QQ authentication helpers' begins with the required 'feat:' prefix and clearly summarizes the main change: adding QQ authentication support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Check ✅ Passed No critical security vulnerabilities detected. Credentials, error handling, and concurrency patterns are secure. Input validation is consistent with existing code patterns.
Engage In Review Feedback ✅ Passed No review feedback comments exist on this PR. The PR was just created (2026-05-12), has no assigned reviewers, and contains no review comments. The check is not applicable at this time.
Description check ✅ Passed The PR description includes all required sections with substantive content: issue reference (#55), clear approach explanation, and comprehensive testing information.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant