Oauth with service now

I wanna have a way to use a different oauth flow for service now (the actual is authorization code) I coulnd’t use an interactive login, as far as I saw when I create a service now credentials it ask to click on connect my account and it open a pop up to login into service now. I wanna use another grant type like credentials with client id and client secret or even grant type password wirh client id, clien secret, user and password. In the post Service Now oauth question - #12 by James_Hiscott

@James_Hiscott mentioned that he fixed the issue changing the grant type to password how it can be done as the grant type is hardcoded on the ts file?