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

login invalid_grant error #20

Closed
cerinoligutom opened this issue Feb 2, 2022 · 1 comment
Closed

login invalid_grant error #20

cerinoligutom opened this issue Feb 2, 2022 · 1 comment

Comments

@cerinoligutom
Copy link

Tried to login but I get an error:
image

Relevant code:

import Pixiv from 'pixiv.ts';
import { env } from './environment';

let client: Pixiv;

export async function usePixivClient() {
  if (!client) {
    client = await Pixiv.login(env.pixiv.username, env.pixiv.password);
  }

  async function getUserIllustrations(params: Parameters<typeof client['user']['illusts']>[0]) {
    return await client.user.illusts(params);
  }

  return {
    getUserIllustrations,
  };
}
@cerinoligutom
Copy link
Author

nvm, should've read closely the notes 😅

maybe deprecate the login() method and recommend refreshLogin() instead?

@Tenpi Tenpi closed this as completed Feb 5, 2022
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

No branches or pull requests

2 participants