Page MenuHomePhabricator

How to create a login method with a custom icon?
Closed, InvalidPublic

Description

I would like to create a login method with a custom icon, but I am so far unable to figure out how I should do that.

To add an icon to a login mehtod, you create a file resources/sprite/login_1x/XYZ.png and add the following to the associated src/auth/PhabricatorAuthProviderXXX.php:

protected function getLoginIcon() {
  return 'XYZ';
}

Afterwards you have to call two scripts to create the sprite map:

./scripts/celerity/generate_sprites.php
./bin/celerity map

However, I provide my login method as a library in a different repository/directory (to be enabled via conf/local/local.json: load-libraries). How am I supposed to make the icon available in this case?

Event Timeline

devurandom raised the priority of this task from to Needs Triage.
devurandom updated the task description. (Show Details)
devurandom added a project: Auth.
devurandom added a subscriber: devurandom.

There's no way to do this right now. You can use the "Generic" icon until we eventually build a modular way to provide icons. This isn't a priority; see T5447 for some rough context and timelines.

I'd like to move off of sprites here altogether, so either FontAwesome or nothing.

eadler added a project: Restricted Project.Aug 5 2016, 5:23 PM