Closed Loewe1000 closed 4 years ago
This isn't implemented yet. I think one idea would be to have the possibility to pass a Credentials
object to the startSession
method.
I will look into it, or you could create a PR (quite busy right now) 😊
Thanks, I will try it with the startSession method.
Hey @Loewe1000, we have added a setCredentials
method yesterday.
So, you can call
MatrixSDK.configure(...)
MatrixSDK.setCredentials(...)
MatrixSDK.startSession()
Documentation of set credentials:
/**
* When you already obtained the credentials using {@see login}, instead of logging in on e.g. every app start,
* you can pass the credentials here. This will save you one login request.
*/
setCredentials(accessToken: string, deviceId: string, userId: string, homeServer: string, refreshToken?: string): void;
Also on android, there is a method called loginWithToken(username: string, token: string, deviceName: string)
it will return an MXCredentials which can be used later on with the procedure I described above.
It is not publicly exposed yet.
Hi,
I would need the possibility to login with token, userID and homeserver instead of username and password, because our implementation of the matrix server works without username and passwords.
If I hardcode token, userID and home server, this works. But is there any method to login with token, id and server with this sdk? This would be great. :)