Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Requested scopes are lowercased when the SDK appends the `openid` scope

Đang mở Phù hợp với người mới
#1,101 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin
Lĩnh vực
authentication

Hướng nghiên cứu

Bắt đầu với OidcUtils.includeRequiredScope và theo dõi cách ParameterBuilder.setScope cùng các API yêu cầu sử dụng nó. So sánh scope được tái hiện với chữ hoa chữ thường lẫn lộn với kết quả khi openid đã có sẵn. Công việc được xem là hoàn tất khi việc thêm openid không làm thay đổi bất kỳ scope nào được yêu cầu; hãy thêm hoặc chạy các bài kiểm thử tập trung cho những trường hợp đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

When the requested scope does not include openid, the SDK appends it, but it also lowercases every other scope in the string. Scope values are case-sensitive (RFC 6749, section 3.3), so a mixed-case API permission such as read:Messages is sent as read:messages, and the authorization server does not grant the permission that was requested.

The scopes are left untouched when openid is already present, so the result depends on whether the caller included openid.

The code path is OidcUtils.includeRequiredScope, which ParameterBuilder.setScope, Request.addParameter("scope", ...), Request.addParameters(...) and WebAuthProvider.login(...).withScope(...) all use.

Reproduction
val params = ParameterBuilder.newBuilder()
    .setScope("profile read:Messages")
    .asDictionary()
// Expected: "profile read:Messages openid"
// Actual:   "profile read:messages openid"
println(params["scope"])

WebAuthProvider.login(account).withScope(...) goes through the same function.

Additional context
  • Auth0.Android: main at acf4068.
  • Workaround: include openid in the scope string yourself.
Ngôn ngữ chính
Kotlin
Star
301
Fork
183
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của auth0/Auth0.Android

Tất cả issue của auth0/Auth0.Android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.