If you are logging first time into the Xfinity router than you will get the option to change the default password, at that option you would be able to change the default password and keep password of your own choice.
After you login in the xfinity router by default credentials (user name : admin,,password : password.)it will give give you the option to change the password.
OR you can change the password by going to the setting after you logged in.
For the First time, whenever you are going to the login into your xfinity router settings using your default information(default username is admin and password is password) then after that it will give you option to change the default password.
we can also change the password after login into the router settings
You need to click on the change password option from the right top side of the screen
At the very first time logging into the Xfinity router you will get the option to change the default password, over there you can change the default password according to your choice.