Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 OAuth - Client SDK #2483

Merged
merged 50 commits into from
Aug 12, 2024
Merged

🚧 OAuth - Client SDK #2483

merged 50 commits into from
Aug 12, 2024

Conversation

matthieusieben
Copy link
Contributor

@matthieusieben matthieusieben commented May 13, 2024

This is a new implementation of the @aproto/api package that makes it ready for being used with OAuth based credentials.

@matthieusieben matthieusieben changed the base branch from main to feat-oauth-server May 13, 2024 11:46
@matthieusieben matthieusieben force-pushed the feat-oauth-client branch 2 times, most recently from b81c5a4 to 305c8f9 Compare May 13, 2024 11:53
@matthieusieben matthieusieben force-pushed the feat-oauth-client branch 3 times, most recently from ed16b2c to f86a48c Compare May 13, 2024 12:44
@matthieusieben matthieusieben force-pushed the feat-oauth-server branch 4 times, most recently from 1e2650f to 0a1e434 Compare May 15, 2024 12:12
@matthieusieben matthieusieben force-pushed the feat-oauth-client branch 5 times, most recently from d481f72 to 22ac587 Compare May 15, 2024 13:05
@matthieusieben matthieusieben force-pushed the feat-oauth-server branch 2 times, most recently from 5f7493f to 931d1d6 Compare May 16, 2024 10:55
.changeset/pre.json Outdated Show resolved Hide resolved
Comment on lines +60 to +62
- The `AtpBaseClient` has been removed. The `AtpServiceClient` has been renamed
`AtpBaseClient`. Any code using either of these classes will need to be
updated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads a little confusing: there is still a AtpBaseClient, but the old implementation was removed and replaced with what was formerly called AtpServiceClient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I guess I could revert the renaming ...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mean change the code, just re-phrase this sentence.

@matthieusieben matthieusieben merged commit b934b39 into main Aug 12, 2024
10 checks passed
@matthieusieben matthieusieben deleted the feat-oauth-client branch August 12, 2024 17:57
@github-actions github-actions bot mentioned this pull request Aug 12, 2024
estrattonbailey added a commit that referenced this pull request Aug 15, 2024
* origin/main:
  Provide a ponyfill for CustomEvent (#2710)
  Ensure presence of DPoP related response headers (#2711)
  prettier ignore changelogs, as changesets not resolving prettier config properly
  Version packages (#2709)
  Export `AtpAgentOptions` type from @atproto/api (#2708)
  tidy
  Version packages (#2706)
  Update changeset to better reflect changes (#2707)
  Client SDK rework (#2483)
  Allow aud of pds or entryway for service auth tokens on pds (#2694)
  Version packages (#2692)
  Lex-cli prettier changes changeset (#2691)
  Version packages (#2689)
  PDS - inspect bearer tokens (#2688)
  Version packages (#2685)
  Service auth method binding - PDS (#2668)
  minor typos in descriptions and comments (#2681)
  Fix run-dev-env-logged command (#2682)
  Version packages (#2677)
  Tweak some wording in `oauth-client-browser` readme (#2678)
haileyok added a commit that referenced this pull request Aug 16, 2024
* feat(api): support creation of oauth based AtpAgents

* oauth: misc fixes for confidential clients

* fix(xprc): remove ReadableStream.from polyfill

* OAuth docs tweaks (#2679)

* OAuth: clarification about client_name being shown

* OAuth: re-write handle resolution privacy concern

* avoid relying on ReadableStream.from in xrpc-server tests

* feat(oauth-types): expose "ALLOW_UNSECURE_ORIGINS" constant

* feat(handle-resolver): expose "AtprotoIdentityDidMethods" type

* fix(oauth-client): ensure that the oauth metadata document contains client_id_metadata_document_supported

* fix(oauth-types): prevent unknown query string in loopback client id

* fix(identity-resolver): check that handle is in did doc's "alsoKnownAs"

* feat(oauth-client:oauth-resolver): allow logging in using either the PDS URL or Entryway URL

* fix(oauth-client): return better error in case of invalid "oauth-protected-resource" status code

* refactor(did): group atproto specific checks in own

* feat(api): relax typing of "appLabelers" and "labelers" AtpClient properties

* allow any did as labeller (for tests mainly)

* fix(api): allow to override "atproto-proxy" on a per-request basis

* remove release candidate versions from changelog

* update changeset for api and xrpc packages

* Add missing changeset

* revert RC versions

* Proper wording in OAUTH.md api example

* remove "pre" changeset file

* xrpc: restore original behavior of setHEader and unsetHeader

* docs: add comment for XrpcClient 's constructor arg

* feat(api): expose "schemas" publicly

* feat(api): allow customizing the whatwg fetch function of the AtpAgent

* docs(api): improve migration docs

* docs: change reference to BskyAgent to AtpAgent

* docs: mention the breaking change regarding setSessionPersistHandler

* fix(api): better split AtpClient concerns

* fix(xrpc): remove unused import

* refactor(api): simplify class hierarchu by removeing AtpClient

* fix(api): mock proper method for facets detection

* restore ability to restore session asynchronously

* feat(api): allow instantiating Agent with same argument as super class

* docs(api): properly extend Agent class

* style(xrpc): var name

* docs(api): remove "async" to header getter

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
Co-authored-by: Hailey <me@haileyok.com>
lindner added a commit to lindner/atproto that referenced this pull request Sep 27, 2024
- Change tests to use AtpClient instead of the deprecated BskyClient
matthieusieben pushed a commit that referenced this pull request Sep 28, 2024
- Change tests to use AtpClient instead of the deprecated BskyClient
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.

3 participants