@@ -292,6 +292,27 @@ def login(self, username, password):
292292 self .me = objects .CurrentUser (self , resp ["data" ])
293293 self .loggedIn = True
294294
295+ def loginb64 (self , b64 ):
296+ '''
297+ Used to initialize the client for use
298+
299+ b64, string
300+ Base64 Encoding of VRC account credentials
301+
302+ Returns void
303+ '''
304+
305+ if self .loggedIn :
306+ raise AlreadyLoggedInError ("Client is already logged in" )
307+
308+ resp = self .api .call ("/auth/user" , headers = {"Authorization" : "Basic " + b64 }, no_auth = True )
309+
310+ self .api .set_auth (b64 )
311+ self .api .session .cookies .set ("auth" , resp ["response" ].cookies ["auth" ])
312+
313+ self .me = objects .CurrentUser (self , resp ["data" ])
314+ self .loggedIn = True
315+
295316 def login2fa (self , username , password , code = None , verify = False ):
296317 '''
297318 Used to initialize client for use (for accounts with 2FactorAuth)
@@ -650,6 +671,30 @@ async def login(self, username, password):
650671
651672 await self .me .cacheTask
652673
674+ async def loginb64 (self , b64 ):
675+ '''
676+ Used to initialize the client for use
677+
678+ b64, string
679+ Base64 Encoding of VRC account credentials
680+
681+ Returns void
682+ '''
683+
684+ if self .loggedIn :
685+ raise AlreadyLoggedInError ("Client is already logged in" )
686+
687+ resp = await self .api .call ("/auth/user" , headers = {"Authorization" : "Basic " + b64 }, no_auth = True )
688+
689+ self .api .openSession (b64 )
690+ self .api .session .cookie_jar .update_cookies (
691+ [["auth" , resp ["response" ].headers ["Set-Cookie" ].split (';' )[0 ].split ("=" )[1 ]]])
692+
693+ self .me = aobjects .CurrentUser (self , resp ["data" ])
694+ self .loggedIn = True
695+
696+ await self .me .cacheTask
697+
653698 async def login2fa (self , username , password , code = None , verify = False ):
654699 '''
655700 Used to initialize client for use (for accounts with 2FactorAuth)
0 commit comments