MCPcopy Create free account
hub / github.com/Preloading/TwitterAPIBridge / GetUserAuthData

Function GetUserAuthData

bluesky/auth.go:92–109  ·  view source on GitHub ↗

This function is to get: the user DID and the user's PDS this should **ONLY** be used during authentication. @results: userDID, userPDS, error

(handle string)

Source from the content-addressed store, hash-verified

90//
91// @results: userDID, userPDS, error
92func GetUserAuthData(handle string) (*string, *string, error) {
93 // thank you https://discord.com/channels/1097580399187738645/1097580399187738648/1318477650485973004 (ducky.ws) on https://discord.gg/zYvmrHAr8M for explaining this to me
94
95 // Get the user's DID
96 userDID, err := ResolveDIDFromHandle(handle)
97 if err != nil {
98 return nil, nil, err
99 }
100
101 // Get the user's PDS
102 userPDS, err := ResolvePDSFromDID(*userDID)
103 if err != nil {
104 return nil, nil, err
105 }
106
107 // and finally, return our data
108 return userDID, userPDS, nil
109}
110
111func ResolveDIDFromHandle(handle string) (*string, error) {
112 // Validate our handle

Callers 1

AuthenticateFunction · 0.85

Calls 2

ResolveDIDFromHandleFunction · 0.85
ResolvePDSFromDIDFunction · 0.85

Tested by

no test coverage detected