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)
| 90 | // |
| 91 | // @results: userDID, userPDS, error |
| 92 | func 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 | |
| 111 | func ResolveDIDFromHandle(handle string) (*string, error) { |
| 112 | // Validate our handle |
no test coverage detected